Questions tagged [pycurl]
PycURL is a Python interface to libcurl.
586
questions
0
votes
1
answer
18
views
What should I use with proxies? Sockets, http.client, pycurl, or anything else?
Okay so basically, I'm writing a piece of code that heavily depends on speed,
headers = {
'Authorization': 'Bearer '+jtw,
}
conn = http.client.HTTPSConnection("api....
0
votes
1
answer
47
views
How to add Pycurl headers
I can't understand this works
How to add multiple headers to pycurl HTTPS request,
I tried to do it but it accepts the user agent only and gives me an error if I tried to add more headers
url = "...
0
votes
0
answers
34
views
Replacing Python Requests with Pycurl
Iam interested to modify a python module (Discum), replace python requests with pycurl and see if this will brung even a minor improvement in performance. Unfortunately my Pycurl knowledge is limited. ...
0
votes
1
answer
30
views
pylance report GeneralTypeIssues on members while typing pycurl example
I am a python beginner learning pycurl with its example on VSCode.
import pycurl
from io import BytesIO
buffer = BytesIO()
c = pycurl.Curl()
c.setopt(c.INTERFACE, 'lo')
c.setopt(c.URL, "http://...
0
votes
0
answers
30
views
pycurl webhook breaks incoming data
I´m using pycurl to hook incoming data from a LAN-based device to a function.
The hook works well in the sense that the function receives the data, but it´s only getting a part of the complete packet ...
1
vote
0
answers
60
views
How to fix the 'link-time ssl backends' error? Windows 10, python3.9.7(or python10)
I started hosting my script on VDS, but I faced an error: when I installing pycurl on windows 10, it gives an error 'ImportError: pycurl: libcurl link-time ssl backends (schannel) do not include ...
0
votes
1
answer
112
views
Program consumed memory keeps growing while using PyCurl in multi threaded environment
Python program consumed memory grows over time when PyCurl is used in multi-threaded environment for concurrent HTTP API calls.
Attached Python code snippet demonstrates the problem.
Program simply ...
0
votes
1
answer
118
views
Python equivalent of CURL with username and api token
I want to write the following curl command into python code. Following is the command for requesting some data from the URL.
<user_name> : replace with the username
<api_token> : replace ...
0
votes
0
answers
106
views
PycURL failed; sftp not supported or disabled. You might need to recompile cURL with enabled support for SFTP macOS m1
Im using pipenv and after activating environment and run the code I have faced problem with curl PycURL failed; sftp not supported or disabled. You might need to recompile cURL with enabled support ...
2
votes
0
answers
282
views
ImportError on `import pycurl` (Python 3.10, macOS)
Working from https://gist.github.com/vidakDK/de86d751751b355ed3b26d69ecdbdb99 I execute these commands:
brew install openssl
brew install curl # this is the latest version with openssl
. .venv/bin/...
0
votes
1
answer
499
views
How to fix "#error architecture not supported" when installing pycurl with Python 3.8.2 on macOS 10.15?
I am trying to install pycurl 7.44.1 and it fails with a
#error architecture not supported
message. Here is what I have:
Python 3.8.2
libcurl 7.64.1
macOS 10.15.7 (Catalina)
(venv) TestBox:...
0
votes
1
answer
666
views
Python convert curl command to urllib.request
I would like to convert my curl to urllib.request command to python, the curl command:
curl -v -i -X POST http://api.textart.io/img2txt.json --form image=@path/to/dir/file.jpg
my code:
import json
...
0
votes
1
answer
170
views
unable to install pycurl on windows for Py 3.7 [duplicate]
In my requirments file there is pycurl==7.43.0.6. I am using Python 3.7. I get the following error:
ERROR: Command errored out with exit status 10:
command: 'c:\python\python.exe' -c 'import ...
0
votes
0
answers
82
views
How can I implement a multi thread scraping
I got this multithread(code 1) developed by friend, and I want implement a multithread scraping using pycurl and bs4(code 2)
CODE 1
import queue
import threading
from abc import ABC, abstractmethod
...
0
votes
0
answers
17
views
PyCurl do not send traffic via specified interface
I am using the library pycurl to do HTTP queries with the following code:
import pycurl
# Execute HTTP query
buffer = ...
0
votes
2
answers
104
views
Translating Bash cURL commands to Python
I have the below working in Bash. How would this be written in Python using requests or pycurl?
curl -o .output_data.xml -v --cert ../cert/my_cert.pem:password123 -k 'https://my.target.url' -H '...
0
votes
0
answers
33
views
How to perform HTTP DELETE with pycurl?
I've written a wrapper around PyCurl that supports GET and POST.
I've tried modifying it to support DELETE but it isn't working. (The same DELETE operation using requests DOES complete, so it's not an ...
0
votes
0
answers
84
views
PycURL installation issues, "FileNotFoundError: [WinError 2]"
(Windows 10, 64 bit, Python 3.9.2, pip 21.2.4, curl 7.78.0)
This all began while I was trying to install pycurl like so:
C:\pycurl-REL_7_44_1>pip install pycurl
Collecting pycurl
Using cached ...
1
vote
1
answer
321
views
libcurl link-time ssl backends (schannel) do not include
ImportError: pycurl: libcurl link-time ssl backends (schannel) do not include compile-time ssl backend (openssl)
i use win10 + py3.9 + pycurl-7.44.1-cp39-cp39-win_amd64.whl + i can't use import ,...
0
votes
1
answer
70
views
How to identify tcp connection used by Curl?
My goal is to find out whether or not subsequent curl request used the same tcp connection as the initial one. I use pycurl and curl_easy_getinfo.
I can see there is a LASTSOCKET in curl_easy_getinfo ...
0
votes
0
answers
51
views
python script to verify the entries in curl output
Im new to python and looking for suggestions on how to achieve the below output. currently i just have a script to fetch the curl reponse. Looking for suggestions to move forward please.
The curl ...
1
vote
1
answer
72
views
curl -i -H "Content-Type : Application/json" -X POST http://127.0.0.1:5000/courses
I try to update the data of json file and use the command
curl -i -H "Content-Type : Application/json" -X POST http://127.0.0.1:5000/courses
but I got an error something like -
Invoke-...
1
vote
1
answer
120
views
pycurl and curl behaving differently when requesting same resource; curl correctly gives a JSON object, PycURL a HTML object
ipinfo.io provides information about the website/server corresponding to an IP address, either by entering it on their website or by sending a request to them via the curl command line utility, e.g:
$ ...
0
votes
0
answers
181
views
How to install a package with Poetry that requires CLI args?
Here's an example that requires it:
poetry add pycurl
... gives:
ImportError: pycurl: libcurl link-time ssl backend (openssl) is different from compile-time ssl backend (none/other)
The fix is given ...
0
votes
1
answer
112
views
How to convert specific CURL request to Python
I have the following Curl request:
curl -v --location --request POST 'http://127.0.0.1:8080/abc' \--header 'Content-Type: application/json' \--data-raw '{data}'
I tried using pycurl and requests ...
0
votes
0
answers
24
views
Using Python requests to unshorten urls - slow (compared to pycurl) [duplicate]
This is about unshortening url shorteners to reveal the end url.
I've been using pycurl, and looking up (for example) ~80 urls takes ~24s in real time.
Using the simple requests code below, looking up ...
0
votes
2
answers
205
views
benchmark HTTP1.1/HTTP2 in python
I did some benchmark on http1.1/http2 with python, the code is as simple as repeating a Google search request many times. The result is interesting: the http2 version is slower considerably. (i tried ...
0
votes
1
answer
542
views
Errors when trying to call pycurl in a lambda on AWS
I want to use pycurl in order to have TTFB and TTLB, but am unable to call pycurl in an AWS lambda.
To focus on the issue, let say I call this simple lambda function:
import json
import pycurl
import ...
-2
votes
1
answer
84
views
What happens when the python thread is in network call(HTTPS) and the context switch happens?
I am having a problem where a multithreaded download application that we wrote is sometimes getting 408 error .
We think it might be because the user has increased the number of threads ,and this has ...
-1
votes
1
answer
32
views
Windows machine Installing pycurl module on Thonny
I am trying to install pycurl module in Thonny virtual environment but without any luck..
Whatever I try, I am getting the same error message:
Please specify --curl-dir=/path/to/built/libcurl
I have ...
1
vote
2
answers
260
views
Extract Id's from response.text()
I want to extract all the values of id's from the following response (finding).
code:
findings= requests.get('https://api.probely.com/targets/TaargetID/findings/36',headers={"Content-Type": &...
2
votes
2
answers
232
views
Execute curl command and fetch response
I have a curl command. I want to fetch the response after executing it in python 3.
curl https://api.abc.com/targets/targetID\
-X POST \
-H "Content-Type: application/json" \
-H "...
3
votes
0
answers
272
views
Pycurl keep alive works with Curl.perform but drops connection frequently when using CurlMulti
I want to use multicurl for the duplex capabilities. The normal curl.perform works fine in keeping the connection alive for a long time.
c = pycurl.Curl()
c.setopt(c.VERBOSE, True)
c.setopt(c.URL, '...
0
votes
0
answers
40
views
How to retrieve curl code, using pycurl python3
In c/c++, the return value of curl_easy_perform() is a curl code that tells you information, 0 on success etc. In python perform() corresponds to curl_easy_perform() as stated in documentation, but i ...
1
vote
0
answers
155
views
HTTP2 post request in pycurl
I am trying to hit a nginx server that is behind an alb. I am triggering a simple HTTP2 POST request using pycurl. My request looks like this'
import io
import pycurl
curl = pycurl.Curl()
curl.setopt(...
-1
votes
1
answer
55
views
Install pyCurl on Pypy
I am trying to install the compiled version of PyCurl, but I get the error:
My system configuration:
0
votes
0
answers
480
views
Why my pycurl is not compiled against Openssl?
I'm trying to run on kali linux 2020 wfuzz, but i got this error
/usr/local/lib/python3.9/dist-packages/wfuzz-3.1.0-py3.9.egg/wfuzz/__init__.py:34: UserWarning:Pycurl is not compiled against Openssl. ...
-2
votes
1
answer
73
views
typeError: unsetopt() is not supported for this option
class ContentCallback:
def __init__(self):
self.contents = ''
def content_callback(self, buf):
self.contents = self.contents + buf
def ...
0
votes
1
answer
3k
views
Could not install PyCurl 7.43.0.6 on Python 3.8.8 | RHEL 8.3
Workstation details:
RHEL 8.3 - x86_64
Python 3.8.8
libcurl 7.61.1-14.el8_3.1
I tried
pip install pycurl==7.43.0.6
The error [traceback]:
ERROR: Command errored out with exit status 1:
command: /...
0
votes
0
answers
22
views
Cant install pycurl in windows [duplicate]
I have python 3.9 installed on windows and for some reason, it cannot install pycurl. Actually, I want to install wfuzz but it requires pycurl.
I ran - pip install pycurl
error -
Collecting pycurl
...
1
vote
1
answer
48
views
pycurl login bad request?
I chose not to use requests because its slower. anyways i think im missing some csrf or cookies token as im trying to login to instagram. The problem with pycurl is it doesnt show the reason for the ...
1
vote
1
answer
192
views
curl get request with python3
I am trying to execute a curl GET request with python3
the request is:
curl -k -X GET -H "X-Some-Token: s.ggt5gvf344f"https://ip.address:port/v1/path/path
how it can be implemented?
0
votes
0
answers
99
views
Pycurl Multi Max requests per sec
I am using below code to hit google geocoding api's to get longitude and latitude, but i need to hit max 50 api/sec. Is there any attribute to set value for no of api calls per sec in pycurl muti?
...
0
votes
1
answer
261
views
pyCurl and BytesIO for scraping a website
I would have a need for scraping. Specifically, I use Pycurl and BytesIO.
The following code:
c = pycurl.Curl()
page = BytesIO()
c.setopt(c.INTERFACE, "tun0")
c.setopt(c.USERAGENT, userAgent)...
0
votes
1
answer
269
views
What's the fastest way to send 100,000 web requests with Python3? [duplicate]
I have about 100,000 URL lists. All are in the same domain and have different subdirectories.
What is the fastest way to check the status codes for this 100,000 URL list?
I am currently making a ...
1
vote
1
answer
1k
views
Trouble with installing pycurl in Windows 10 [duplicate]
I tried installing pycurl with the .msi installer on Windows. After installing, I tried to import the module pycurl. This is what I got:
Python 3.9.1 (tags/v3.9.1:1e5d33e, Dec 7 2020, 17:08:21) [MSC ...
1
vote
1
answer
672
views
Cant install PyCurl
i tried to install py curl but i get this error...
pip install pycurl
Collecting pycurl
Using cached pycurl-7.43.0.6.tar.gz (222 kB)
ERROR: Command errored out with exit status 10:
command: ...
0
votes
1
answer
47
views
Putting into a single loop response code and response time of a website
I want to request 10 times a website and to see each time the status code, the start transfer time and the total time response time. I don't see how to look for these 3 informations into the same loop ...
0
votes
0
answers
80
views
Pycurl is installed on my computer, but is not being recognised or found in PyCharm
i have been writing a script in python in the IDE PyCharm , but pycurl is not being imported. This is the error which I recieve:
ImportError: dlopen(/Users/danielraad/PycharmProjects/VisualiseGrocery/...
0
votes
1
answer
372
views
When I use pycurl to execute a curl command, I get error 3 "illegal characters found in URL" but when pasting said URL in Chome, it can be resolved
Good day. I'm writing a python program that requests some posts from my Facebook page. To do so, Facebook offers a tool that they call "Graph API Explorer". Using something similar to a GET ...