Any idea to encapsulate a session fearure just like in python request? #2058
-
What problem are you trying to solve?Any idea to encapsulate a session fearure just like in python request to management cookie automatically? Describe the featureWe're a team which make some crawler job, and some of then is transfer from python. s = requests.Session()
s.get('https://httpbin.org/cookies/set/sessioncookie/123456789')
r = s.get('https://httpbin.org/cookies')
print(r.text)
# '{"cookies": {"sessioncookie": "123456789"}}'you can find more tips from this link. ... |
Beta Was this translation helpful? Give feedback.
Answered by
sindresorhus
Jun 10, 2022
Replies: 1 comment
-
|
Cookie handling is documented here: https://github.com/sindresorhus/got/blob/main/documentation/tips.md#cookies |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
sindresorhus
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Cookie handling is documented here: https://github.com/sindresorhus/got/blob/main/documentation/tips.md#cookies