Skip to content

Commit 411b73a

Browse files
committed
- fixed cookie injection
1 parent 40b2a94 commit 411b73a

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "phub"
3-
version = "4.8.5"
3+
version = "4.8.6"
44
description = "An API for Pornhub"
55
authors = [
66
{name = 'Egsagon', email = "[email protected]"},

src/phub/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def __init__(self,
6161
self.core = core or BaseCore(config=RuntimeConfig())
6262
self.core.initialize_session()
6363
self.core.session.headers.update(consts.HEADERS)
64-
self.core.session.cookies.update(consts.HEADERS)
64+
self.core.session.cookies.update(consts.COOKIES)
6565
# Applying PornHub specific cookies and headers to base API
6666
self.logger.debug('Initialised new Client %s', self)
6767

src/phub/modules/parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,6 @@ def challenge(client: Client, challenge: str, token: str) -> None:
8080
# Build and inject cookie
8181
cookie = f'{n}*{p // n}:{s}:{token}:1'
8282
client.core.config.cookies = {'KEY': cookie}
83-
client.core.update_cookies()
83+
client.core.session.cookies.update({'KEY': cookie})
8484
logger.info('Injected cookie %s', cookie)
8585
# EOF

0 commit comments

Comments
 (0)