简体   繁体   中英

Python web scraping with requests and beautiful soup blocked by needing javascript

I am trying to scrape text from a website. I use the simple code: requests.get(url_here). My code has worked until recently. Now, when I use requests, instead of getting the site's text, I get a message saying:

"The site requires JavaScript to be enabled, The browser you're using doesn't support JavaScript. or has JavaScript turned off."

I have verified that my browser does have javascript enabled. Is there a way around this?

Working in Python with a Jupyter notebook on a Mac, for reference.

Here is a small article that was written by me. It is a very basic web scraping of the BookMyShow website. I hope it will work for you.

Introduction to Web Scraping

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM