I am trying to parse a website where I have to first the cookies and then pass to another request. In Python I can do the following:
session = requests.Session()
response = session.get('https://www.page.com')
cookies = response.cookies
response = session.get('https://www.page.com/part/1234', headers=headers,cookies=cookies)
print(response.text)
What options do I have available if I use the file_get_contents
or Requests
library?
I could not find it in this library.