mirror of
https://github.com/soimort/you-get.git
synced 2025-01-23 13:35:16 +03:00
load cookie only domain match
This commit is contained in:
parent
4119a1493e
commit
5b11d77f9f
@ -467,7 +467,8 @@ def get_content(url, headers={}, decoded=True):
|
||||
# Here we add cookies to the request headers manually
|
||||
cookie_strings = []
|
||||
for cookie in list(cookies):
|
||||
cookie_strings.append(cookie.name + '=' + cookie.value)
|
||||
if cookie.domain in url and cookie.path in url:
|
||||
cookie_strings.append(cookie.name + '=' + cookie.value)
|
||||
cookie_headers = {'Cookie': '; '.join(cookie_strings)}
|
||||
req.headers.update(cookie_headers)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user