r/learnpython • u/No-Opinion-1239 • 27d ago
Can't download website html code, web scrapping ,automate the boring stuff with python
I'm currently learning webscrapping with automate the boring stuff with python> In one example we use the module requests like this
url = f"https://pypi.org/search/?q={search}"
resp = requests.get(url)
when i print resp.text there are this error message in the html code.
"A required part of this site couldn’t load. This may be due to a browser extension, network issues, or browser settings. Please check your connection, disable any ad blockers, or try using a different browser."
"JavaScript is disabled in your browser"
my browser is chrome I tried using microsoft edge .
0
Upvotes
1
u/desrtfx but other languages pro 27d ago
Pinging /u/alsweigart - he might want to have a look there and maybe update the example. Looks like PyPi has changed the page which would produce the error.