I am brand new to Python and have not very good at it. I am trying to web scrape from a website called Transfermarkt (I'm a big football fan) but its giving me HTTP Error 404 when I try extract data. Here is my code:
from urllib.request import urlopen as uReq
from bs4 import BeautifulSoup as soup
my_url = "https://www.transfermarkt.com/chelsea-fc/leihspielerhistorie/verein/631/plus/1?saison_id=2018&leihe=ist"
uClient = uReq(my_url)
page_html = uClient.read()
uClient.close()
page_soup = soup(page_html, "html.parser")
for che in chelsea:
player = che.tbody.tr.td.table.tbody.tr.td["spielprofil_tooltip tooltipstered"]
print("player: " +player)
Error says:
Traceback (most recent call last):
File "C:\Users\x15476582\Deskto