This repository has been archived by the owner on Aug 3, 2023. It is now read-only.
wss protocol help #614
Unanswered
Yorddyyorddy
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
i am trying to scrap a site which uses wss protocol but i faced error that it is not possible with python requests
`
import requests
headers = {
'Pragma': 'no-cache',
'Origin': 'https://askyourpdf.com',
'Accept-Language': 'en-IN,en;q=0.9',
'Sec-WebSocket-Key': 'fwLJl8KZ0UQ7RbKRkWm/qw==',
'User-Agent': 'Mozilla/5.0 (Linux; Android 13; SM-M135FU) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Mobile Safari/537.36',
'Upgrade': 'websocket',
'Cache-Control': 'no-cache',
'Connection': 'Upgrade',
'Sec-WebSocket-Version': '13',
'Sec-WebSocket-Extensions': 'permessage-deflate; client_max_window_bits',
}
response = requests.get('wss://api.askyourpdf.com/chat/4495b1c0-76d0-4107-841c-5216315d5284', headers=headers)
print(response.text)`
@acheong08
Beta Was this translation helpful? Give feedback.
All reactions