Questions tagged [pycurl]

PycURL is a Python interface to libcurl.

PycURL is a Python interface to libcurl. PycURL can be used to fetch objects identified by a URL from a Python program, similar to the urllib Python module. PycURL is mature, very fast, and supports a lot of features.

609 questions
0
votes
1 answer

Python: Migrating to pyCurl from requests file upload

I'm expecting problems with migrating from requests to pyCurl, my code looks like this: c = pycurl.Curl() c.setopt(c.POST, 1) c.setopt(c.URL, self.UploadURL) c.setopt(c.HTTPPOST, [("files[]", (c.FORM_FILE, local_path))]) c.perform() c.close() But…
Marek Grzyb
  • 177
  • 13
0
votes
0 answers

pycurl: How to authenticate making a POST request

Using the following command via cURL (Windows): curl -u username:password "https://website.com/update/" --data…
juiceb0xk
  • 949
  • 3
  • 19
  • 46
0
votes
0 answers

Pycurl Get Json request is returning information as on long string and not formatting

Right now when I'm writing my code my pycurl response returns my json information but its just showing as one string instead of returning it formatted. I'd like it to format but everything I've tried seems to fail on every front. import pycurl …
0
votes
2 answers

Loop to check if a variable has changed in Python

I have just learned the basics of Python, and I am trying to make a few projects so that I can increase my knowledge of the programming language. Since I am rather paranoid, I created a script that uses PycURL to fetch my current IP address every x…
user8075674
0
votes
0 answers

PycURLLibrary can not load module pycurl while console python can

I'm trying to run some robot tests using python 2.7 and curl on ubuntu 16.04. This requires the python module "robotframework-pycurllibrary", which itself uses pycurl. Howver, when starting the tests I get the following error: Error in file ...:…
0
votes
1 answer

How to build PyCurl on MACOSX 10.11.6 without error

I am trying to build Pycurl against a version of libcurl (7.53.1) without success. I am on MACOSX El Capitan v10.11.6. I am not even sure I am aligned with OpenSSL at this point. I may need to make sure OpenSSL is properly installed and get Curl…
Mickael T
  • 895
  • 2
  • 8
  • 19
0
votes
0 answers

What is the difference between the curl and pycurl statements below?

Edit: I added the verbose output of both curl and pycurl below. Apart from the HTTP 200 vs. 500 response I still don't see any difference. I would like to download a file in a Python script. I wrote curl statements which do the job in bash: t=$(echo…
deeenes
  • 4,148
  • 5
  • 43
  • 59
0
votes
1 answer

How to pass encoded Amazon s3 signed URL in python curl Postfields?

I need to pass an amazon s3 signed URL to my python cURL function. The signed url have some special characters as '%' which is passed to the cURL POSTFIELDS and after the processing I am getting 500 Internal Server error. Is there a way to pass the…
Dipanwita Das
  • 329
  • 2
  • 6
  • 15
0
votes
1 answer

passing multiple parameters for the url using pycurl

I want to make a curl call with a URL that has multiple parameters. I have listed the code below. Is there an equivalent option for "curl -d @filter" for instance or do I have URL encode the parameters? SER = foobar PASS = XXX STREAM_URL =…
calmcajun
  • 173
  • 1
  • 4
  • 17
0
votes
0 answers

Faster method than pycurl in python

I want to send many requests to a string field of a proxy site. I write this script: import pycurl i = 0 c = pycurl.Curl() c.setopt(c.URL, 'http://proxysite/index.php?q=test') while True: c.perform() i += 1 print ('Num of REQ = ',…
Richard
  • 69
  • 2
  • 10
0
votes
0 answers

How limit the output of reponse.getvalue() in python while using pycurl

Am using python script to execute a curl command on a list of servers and write the output to individual servers. below is the config file server1, server2, server3 And the python script is written in to achieve that my script should read one…
Adarsh H D Dev
  • 588
  • 7
  • 29
0
votes
1 answer

Conversion of curl command using pycurl library

I have this curl command to execute by means of pycurl library: curl https://lipn.univ-paris13.fr/framester/en/wfd_json/sentence -d "data=Remember the milk:t" -X PUT and this is my pycurl conversion: url =…
0
votes
1 answer

Pycurl SSL Session ID not working, when provided with SSL keys

By default libcurl (and pycurl) supports ssl connection resuse, meaning for a case of sending subsequent HTTPS requests, the second one will use the SSL session ID and avoid the full handshake. (basically pycurl.SSL_SESSIONID_CACHE is True). When I…
Amir
  • 5,996
  • 13
  • 48
  • 61
0
votes
1 answer

How to implement a retry option in PyCurl

How could I implement a retry option within the PyCurl (libcurl) module in python? Something similar to the effect of: curl --retry 3 --retry-delay 5 'http://somesite.com/somefile' Current code: buffer = BytesIO() c = pycurl.Curl() c.setopt(c.URL,…
Karimi
  • 1,387
  • 1
  • 13
  • 19
0
votes
0 answers

file copy speed using pycurl and threading

I have a script that copies 50 or so files linked to by urls. The files average about 20 MB in size and I am using pycurl from within a custom file_copy function to copy them. I started several file_copy threads in order to increase speed, but with…
Craig Burgler
  • 1,749
  • 10
  • 19