lwthiker / curl-impersonate

curl-impersonate: A special build of curl that can impersonate Chrome & Firefox
MIT License
3.69k stars 245 forks source link

PyCurl example? #111

Closed MortonPNZ closed 2 years ago

MortonPNZ commented 2 years ago

Newbee question, but can somebody, please, write a basic example how to use curl-impersonate in PyCurl instead of Curl?

ycq0125 commented 2 years ago

Newbee question, but can somebody, please, write a basic example how to use curl-impersonate in PyCurl instead of Curl? https://github.com/ycq0125/pycurl

cd pycurl
C_INCLUDE_PATH=/usr/include/libxml2:/MyLib
# ex:C_INCLUDE_PATH=/usr/include/libxml2:/curl_test/curl-impersonate/build/curl-7.84.0/include
export C_INCLUDE_PATH
python3 setup.py install --curl-config=/usr/local/bin/curl-impersonate-chrome-config 
python3 test.py
MortonPNZ commented 2 years ago

Newbee question, but can somebody, please, write a basic example how to use curl-impersonate in PyCurl instead of Curl? https://github.com/ycq0125/pycurl

cd pycurl
C_INCLUDE_PATH=/usr/include/libxml2:/MyLib
# ex:C_INCLUDE_PATH=/usr/include/libxml2:/curl_test/curl-impersonate/build/curl-7.84.0/include
export C_INCLUDE_PATH
python3 setup.py install --curl-config=/usr/local/bin/curl-impersonate-chrome-config 
python3 test.py

Realy big thanks.

Shleif91 commented 1 year ago

Can you tell me how to run pycurl + curl-impersonate in docker?

MortonPNZ commented 1 year ago

Nope, dont use docker... next step maybe, but now dont have any ideas

gallamine commented 1 year ago

To clarify: is there a way to pip install pycurl and then have it use curl-impersonate, or do I need to build pycurl from scratch?