change user agent ahhh
This commit is contained in:
parent
6d57c1c4f2
commit
8e28be9b90
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue