reading-notes

Web Scraping

Web scraping is a technique to automatically access and extract large amounts of information from a website, which can save a huge amount of time and effort.

Important notes about web scraping:

Python Code

We start by importing the following libraries:

Next, we set the url to the website and access the site with our requests library.

url = 'http://web.mta.info/developers/turnstile.html'
response = requests.get(url)
soup = BeautifulSoup(response.text, “html.parser”)

Then use the methods like .findAll to locate the desired elements.

Source: https://towardsdatascience.com/how-to-web-scrape-with-python-in-4-minutes-bc49186a8460

Web Scraping best practices to follow to scrape without getting blocked

Source: https://www.scrapehero.com/how-to-prevent-getting-blacklisted-while-scraping/

Things I want to know more about