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
0 answers

how would I speed up my python pycurl looping requests

I am attempting to just generate traffic on the network by having a large list of sites that I am opening from a text file. I then would like to get the site and all the href links. Go to those links and then the site, then proceed onto the next…
Spyderz
  • 19
  • 1
  • 4
0
votes
1 answer

How to multithread URL requests in python 2.6 using 'pycurl' and 'threading' modules?

I am on python 2.6 HTTPD 2.2.15 CentOS 6 I am writing a python script that involves making a lot of REST API calls. I decided to try increase the speed of the program by multi-threading the URL requests. I used the requests module and everything…
Paulo
  • 51
  • 1
  • 9
0
votes
2 answers

Pycurl Import Error: SSL Backend Mismatch

I'm having issues with link-time and compile-time ssl backend errors when trying to import pycurl into a python script. This script ran fine on OSX, however not on my current setup. I am running Ubuntu 16.04LTS on VirtualBox, Host OS Win10, Python…
0
votes
2 answers

How to raise Exception in OPENSOCKETFUNCTION of pycurl

As per https://curl.haxx.se/libcurl/c/CURLOPT_OPENSOCKETFUNCTION.html, libcurl document said that this callback can be used for IP address blacklisting, so I decided to use it to block all private IP address. I have tried raise Exception directly in…
Squirrel
  • 3
  • 2
0
votes
2 answers

is there an easy way of fetching the sent headers of an http request for pycurl/curl?

Right now I'm using a proxy where I can see the headers that are sent. I'm wondering if there's a simpler pycurl method of grabbing the headers that were sent in an http request. Ive tried using HEADERFUNCTION already but it gives you the response…
Incognito
  • 1,883
  • 5
  • 21
  • 28
0
votes
0 answers

urllib/urllib2 vs pycurl performance

I'm interested if anyone has run a benchmark on urllib/urllib2 vs pycurl performance. I know there has been a benchmark between pycurl and requests, but has anyone done this for urllib2/urllib vs pycurl in (preferably) python 2.7 or python 3.6 (or…
0
votes
1 answer

Translating cURL request to python

I have to make a cURL request that sends information to the server, the working example request looks like: curl "https://api.XX.com" -u ":test_KayuXJKEdc" -d "name=Sam" -d "address=123 Mockingbird" -d "city=Somewhere" I've tried pycurl, httplib2,…
Tony
  • 13
  • 1
  • 3
0
votes
1 answer

pycurl post request hangs infinitely on perform()

I am trying to make a post request using pycurl but request hangs infinitely on c.perform(). My code is: try: from io import BytesIO except ImportError: from io import StringIO as BytesIO buffer = BytesIO() …
john doe
  • 65
  • 2
  • 9
0
votes
2 answers

python: parsing data from a buffer

I collect data from a website, using the pycurl functions. Following the example code, after slight modifications I do get all the data in one big buffer. It comes in a format of { "field_id":"data","field_id2":"data2", .. } I wish to parse this…
Karel Adams
  • 185
  • 2
  • 19
0
votes
1 answer

DNS resolve result in Pycurl

I need to get the result of dns resolution of the input URL using PyCurl. Following is the code: buf = cStringIO.StringIO() c = pycurl.Curl() c.setopt(c.URL, url) c.setopt(c.WRITEFUNCTION, buf.write) c.setopt(c, c.CURL_IPRESOLVE_WHATEVER,…
vahidzolf
  • 109
  • 1
  • 1
  • 13
0
votes
1 answer

pycurl error: Transfer-Encoding in 200 response from HTTPS proxy

I am trying to write an HTTP client using pycurl library which talks to a origin server via a proxy. Expecting below flow - 1. HTTP Client -> Proxy: SSL Exchange ## SUCCESS 2. HTTP Client -> Proxy: HTTP CONNECT https://origin_server ##…
0
votes
0 answers

linux centos6.6 "Errno 14 PYCURL ERROR 18 - "transfer closed with 5691386 bytes remaining to read"

when i updated centos6.6 system's kernel , Centos6.6 raised few “pycurl exceptions” . but i could not found out problem where it exists, ,many thanks for anyone who can get me out from problem when i executed a command " yum update kernel -y" is…
0
votes
1 answer

Python Pycurl POST method issue with Ambari CURL commands

I'm following this to restart Ambari components that are in INSTALLED state, for this i have written a python code parse the Ambari services using Pycurl that works. But once the JSON is parsed i will be generating a JSON file like: …
0
votes
2 answers

How to sett the HTTP_VERSION in Pycurl for use with Mindtouch CURL interface

I am trying to access a Mindtouch Wiki using Python. I am trying to use pycurl to do this as the sparse Mindtouch documentation does give CURL command line examples. I found by trial and error that the operation needs the --http1.0 option to be…
Stephen Ellwood
  • 394
  • 1
  • 2
  • 11
0
votes
0 answers

How to install pycurl using "sudo easy_install pycurl" under Python 3?

Hello I am very new to Python. I am trying to install Pycurl on Mac OSX 10.10.1. I have bothy Python 2 and 3 installed on my mac. Although the python scripts I am running can only work with Python 3. I tried both pip install pycurl and sudo…
Rui
  • 95
  • 1
  • 14