User latest Chrome user-agent
Anirudh Oppiliappan x@icyphox.sh
Sat, 03 Apr 2021 19:35:05 +0530
1 files changed,
3 insertions(+),
0 deletions(-)
jump to
M
app/html.py
→
app/html.py
@@ -22,6 +22,9 @@ return urls
def fetch_page(url): + headers = { + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36" + } res = requests.get(url) soup = BeautifulSoup(res.content, "lxml") for a in soup.find_all("a"):