Navigation X
ALERT
Click here to register with a few steps and explore all our cool stuff we have to offer!



   1666

so what the problem is when i request in python

by Zentred - 27 October, 2021 - 06:41 PM
This post is by a banned member (Zentred) - Unhide
Zentred  
Infinity
611
Posts
124
Threads
4 Years of service
#1
(This post was last modified: 27 October, 2021 - 06:41 PM by Zentred. Edited 1 time in total.)
what is required to get the actual response?

i sent to request with headers, like normally but difference is when i do it on chrome like actual it will give the response with csrf
when i do it in python it like this, even if cookie included

<title>Attention Required! | Cloudflare</title>

<meta name="captcha-bypass" id="captcha-bypass" />
and has more response 


CODE IS VVVVVVV
https://pastebin.com/4Ck0AfE6
This post is by a banned member (Isaac) - Unhide
Isaac  
Godlike
32
Posts
45
Threads
4 Years of service
#2
use

resquests.get
don't use session
[Image: 4Ev9Kma.png]
This post is by a banned member (Zentred) - Unhide
Zentred  
Infinity
611
Posts
124
Threads
4 Years of service
#3
(27 October, 2021 - 06:42 PM)S_J Wrote: Show More
use

resquests.get
don't use session

the same response happen too idk why

but no problem i will not use req because its just grab csrf so no need :D
This post is by a banned member (SirDank) - Unhide
SirDank  
Supreme
1.870
Posts
54
Threads
5 Years of service
#4
use cloudscraper :)
This post is by a banned member (ZeroTolerance) - Unhide
147
Posts
19
Threads
5 Years of service
#5
if you're trying to login to patreon using requests, you don't have to do any request to that specific url, instead :
 
Code:
headers = {'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36'}
data = '{"data":{"type":"user","attributes":{"email":"%s","password":"%s"},"relationships":{}}}' % (user, passw)

resp = requests.post('https://www.patreon.com/api/login?include=campaign%2Cuser_location&json-api-version=1.0', data=data, headers=headers)

just change (user, passw) with the login information
This post is by a banned member (BruteAll) - Unhide
This post is by a banned member (Zentred) - Unhide
Zentred  
Infinity
611
Posts
124
Threads
4 Years of service
#7
(05 November, 2021 - 08:18 PM)BruteAll Wrote: Show More
Code:
import requests

req = requests.Session()
r = req.get('https://www.patreon.com/login')
print(r.headers)
print(r.cookies)
print(r.text)

That's what works

hmm it was probably because of the headers i used when requesting
this was also the problem on another site that i made a thread about

i never considered it for this cause i didn't bother with patreon after this, but thanks anyway :B
This post is by a banned member (BruteAll) - Unhide

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
or
Sign in
Already have an account? Sign in here.


Forum Jump:


Users browsing this thread: 1 Guest(s)