New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to send raw post? #254
Comments
This feature is not supported and it can't be implemented because it's not supported by Puppeteer for Firefox. Related #266 You can write your own script to:
|
@ngosang |
You are doing something wrong. If you use the Cookies and the User-Agent provided by FlareSolverr it will work. There are several software out there using that method. |
I'm trying to follow your recommendation, about adding headers, using Python but It's not working. I'm getting a 403 with the "Checking if the site connection is secure... needs to review the security of your connection before proceeding" page. data = {
'cmd': 'request.get',
'url': url,
'session': 'sessid'
}
d = json.dumps(data)
r = requests.post('http://flaresolverr:8191/v1', data=d, headers={'Content-Type': 'application/json'})
js = r.json()
res = js.get('solution')
soup_download = BeautifulSoup(res.get('response'), 'lxml')
bs_url = soup_download.find(class_='downIt').get('href')
cookies = res.get('cookies')
userAgent = res.get('userAgent')
cookie = ''
for cook in cookies:
cookie = cookie + cook['name'] + '=' + cook['value'] + ';'
headers = {
'cookie': cookie,
'user-agent': userAgent,
'referer': 'https://referer.com/'
}
r = requests.post(bs_url, headers=headers)
print(r.status_code) # 403
print(r.text) # "Checking if the site connection is secure" page Any idea what I might be doing wrong? I'm currently using version 2.2.10 |
I am trying to set header 'content-type: application/json' and post not encoded data in the request body;
So that it looks like this:
http://joxi.net/Dr86oRdFoOEZQ2
But FlareSolverr encode data (in param postData) and set header "content-type: application/x-www-form-urlencoded".
http://joxi.net/KAxzgBnhZPQ4Zm
Is it possible to say FlareSolverr not to encode body and not to set header content-type?
The text was updated successfully, but these errors were encountered: