0

I am trying to get the HTML code from a Yahoo Finance page in order to do some web scraping stuff and create tables from data, etc.

The issue is that any website I try this with is redirecting me to the error/bot page so I am not being able to get the code or the actual page I need, I am using the Pycharm Python Editor and the request module

import requests
from bs4 import BeautifulSoup
url = 'https://finance.yahoo.com/cryptocurrencies'
page = requests.get(url)
soup = BeautifulSoup(page.text, 'lxml')
print(soup)

I can tell I am on the wrong page since the HTML has stuff like robot and error in it Because of this I am unable to move forward in my project.

Note: it works with some websites just fine but with some others, I automatically get sent to the error page

0 Answers0