Comments (4)
@ElPapi89
I do not see anything of this project and curl_chrome99
command in your code.
If you plan to run it in Python. You must first compile this project or launch Docker for it and make sure that the following command on the command line gives the correct result:
curl_chrome99 'https://api.pegaxy.io/rent/0?rentMode=SHARE_PROFIT'
or
docker run --rm lwthiker/curl-impersonate:0.4-chrome curl_chrome99 https://api.pegaxy.io/rent/0?rentMode=SHARE_PROFIT
Then, with the help of shell command methods, call it in Python. For example, something like this:
import subprocess
p = subprocess.Popen("curl_chrome99 https://api.pegaxy.io/rent/0?rentMode=SHARE_PROFIT", stdout=subprocess.PIPE, shell=True)
print(p.communicate())
Or other methods mentioned in this article, for example:
https://www.the-analytics.club/python-shell-commands
from curl-impersonate.
Hi,
When you use the wrapper scripts (e.g. curl_chrome99
) all the default Chrome headers are already added for you. You can look at the script: it is a simple wrapper around the curl-impersonate
binary that sets the ciphers, HTTP headers and a few other options. They way you have used the script causes the headers to be added twice, which might be the reason that Cloudflare blocks you.
Try simply running:
curl_chrome99 'https://api.pegaxy.io/my/info'
If you need to change any of the hard-coded headers, the way to go should be modifying the script.
Let me know if that works so I know whether I can close this issue.
from curl-impersonate.
Thanks. No problem right now. If the problem is repeated, I will leave the message again.
from curl-impersonate.
A.Z.,
Im trying to acess pegaxy api and its impossibl. i tried add headers e sessio, but nothing. can u help me? i saw ur post about the that.
import requests
import json
url = "https://api.pegaxy.io/rent/0?rentMode=SHARE_PROFIT"
headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0' ,
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' ,
'Accept-Language': 'en-US,en;q=0.5' ,
'Connection': 'keep-alive' ,
'Upgrade-Insecure-Requests': '1' ,
'Sec-Fetch-Dest': 'document' ,
'Sec-Fetch-Mode': 'navigate' ,
'Sec-Fetch-Site': 'none' ,
'Sec-Fetch-User': '?1',
'Pragma': 'no-cache' ,
'Cache-Control': 'no-cache'
}
response = requests.get(url, headers=headers)
response.raise_for_status() # raises exception when not a 2xx response
if response.status_code != 204:
return response.json()
response
Im getting this error
HTTPError: 403 Client Error: Forbidden for url: https://api.pegaxy.io/rent/0?rentMode=SHARE_PROFIT
Thanks
from curl-impersonate.
Related Issues (20)
- Homebrew recipe? HOT 1
- JA4+ HOT 2
- Homebrew unofficial receipt available HOT 1
- Ubuntu 22:04 libcurl-impersonate-chrome.so cannot be preloaded HOT 3
- Websocket on Windows HOT 6
- Pre shared key extension
- make chrome-build fails HOT 1
- Fiddler Intergration / Cloudfare bypass
- WS/WSS Protocol in Docker Image HOT 3
- compile error on boringssl - [-Werror,-Wunused-but-set-variable] HOT 3
- Content-Encoding may be gzip but the response body is uncompressed
- Safari http2 fingerprints are not correct
- make chrome-build failed HOT 7
- Bypassing Cloudflare HOT 6
- Impersonation no longer good enough?
- recompile php with curl-impersonate HOT 1
- curl: (56) HTTP/2 stream 1 was reset
- Namespace wrapping for firefox and chrome in one?
- Use Different browsers, ... , But get same fingerprints
- Precompiled binary doesn't work, but docker version works well for chatGPT.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from curl-impersonate.