'Get request headers cookies webbrowser pyautogui
I am trying to simulate a manual process to get the cookies of request headers for specific url Here's my try till now
import webbrowser
import pyautogui
import time
url = 'https://www.moi.gov.kw/mfservices/immigration-fines/residency/281080801871'
webbrowser.register('chrome',
None,
webbrowser.BackgroundBrowser("C://Program Files//Google//Chrome//Application//chrome.exe"))
webbrowser.get('chrome').open_new(url)
pyautogui.keyDown('ctrl')
pyautogui.keyDown('shift')
pyautogui.press('i')
pyautogui.keyUp('ctrl')
pyautogui.keyUp('shift')
time.sleep(3)
pyautogui.hotkey('f5')
The code simply opens the url in the chrome browser then open the Netwok (Chrome Developer Tools) then refresh so as to get the files loaded in the Network tab in chrome developers tools
How can I copy cURL as cmd by the code or the question in another way, how can I get the cookies in the request headers section?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
