change user agent ahhh

This commit is contained in:
mcinj 2022-05-12 12:05:35 -04:00
parent 6d57c1c4f2
commit 8e28be9b90

View file

@ -67,7 +67,10 @@ class SteamGifts:
return session return session
def get_soup_from_page(self, url): def get_soup_from_page(self, url):
self.requests_retry_session().get(url) headers = {
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36',
}
self.requests_retry_session().get(url, headers=headers)
r = requests.get(url, cookies=self.cookie) r = requests.get(url, cookies=self.cookie)
soup = BeautifulSoup(r.text, 'html.parser') soup = BeautifulSoup(r.text, 'html.parser')
return soup return soup