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
12
votes
1 answer

How to properly handle multiple binary files in python?

I'm currently working on a multi-threaded downloader with help of PycURL module. I am downloading parts of the files and merging them afterwards. The parts are downloaded separately from multiple threads , they are written to temporary files in…
Xplore
  • 361
  • 1
  • 2
  • 12
12
votes
3 answers

Error in installation pycurl 7.19.0

I need install this specific version (7.19.0) pycurl. When I try to install with this command: pip install pycurl==7.19.0 I'm receiving this error. Failed building wheel for pycurl Running setup.py clean for pycurl Failed to build pycurl…
Renato Cassino
  • 792
  • 1
  • 7
  • 27
12
votes
5 answers

pycurl installation on Windows

I am not able to install pycurl on Windows on Python2.6. Getting following error: C:\Documents and Settings\vijayendra\Desktop\Downloads\pycurl-7.19.0>python setup.py install --curl-dir="C:\Documents and…
Vijayendra Bapte
  • 1,378
  • 3
  • 14
  • 23
11
votes
3 answers

Logging in and using cookies in pycurl

I need to download a file that is on a password protected page. To get to the page manually I first have to authenticate via an ordinary login page. I want to use curl to fetch this page in script. My script first logins. It appears to succeed--it…
Vance
  • 111
  • 1
  • 1
  • 4
10
votes
4 answers

Pycurl keeps printing in terminal

I am a beginner using Python and Pycurl for webpage stressing testing purposes. However, pycurl keeps printing out returned html in the terminal which makes the stress testing take even more time than it should. One such pycurl code I am using is…
jyim89
  • 245
  • 3
  • 12
10
votes
2 answers

Getting HTML with Pycurl

I've been trying to retrieve a page of HTML using pycurl, so I can then parse it for relevant information using str.split and some for loops. I know Pycurl retrieves the HTML, since it prints it to the terminal, however, if I try to do something…
Sinthet
  • 873
  • 2
  • 8
  • 13
10
votes
1 answer

Pip Requirements.txt --global-option causing installation errors with other packages. "option not recognized"

I'm having difficulties with the --global-option and --install-option settings for a requirements.txt file. Specifying the options for one library is causing other libraries installs to fail. I'm trying to install Python libraries "grab" and…
Shane
  • 115
  • 1
  • 9
10
votes
2 answers

pycurl equivalent of "curl --data-binary"

I'd like to know the equivalent of this curl command in pycurl: curl --data-binary @binary_data_file.bin 'http://server/myapp/method' Note: The above curl statement uses the POST method. I need to use this for compatibility with my server script.
ChrisGuest
  • 3,398
  • 4
  • 32
  • 53
9
votes
3 answers

Posting raw data with Python

I'm playing around with the Google Checkout API and I want to pull it into a Django app. I need to post data to Google using basic http authentication. I've been testing this with curl like this: curl -d "$(cat mytest.xml)" -u username:password…
Oli
  • 235,628
  • 64
  • 220
  • 299
9
votes
5 answers

Python code like curl

in curl i do this: curl -u email:password http://api.foursquare.com/v1/venue.json?vid=2393749 How i can do this same thing in python?
diegueus9
  • 29,351
  • 16
  • 62
  • 74
9
votes
3 answers

Fire off function without waiting for answer (Python)

I have a stream of links coming in, and I want to check them for rss every now and then. But when I fire off my get_rss() function, it blocks and the stream halts. This is unnecessary, and I'd like to just fire-and-forget about the get_rss()…
knutole
  • 1,709
  • 2
  • 22
  • 41
8
votes
3 answers

pycurl: RETURNTRANSFER option doesn't exist

I'm using pycurl to access a JSON web API, but when I try to use the following: ocurl.setopt(pycurl.URL, gaurl) # host + endpoint ocurl.setopt(pycurl.RETURNTRANSFER, 1) ocurl.setopt(pycurl.HTTPHEADER, gaheader) # Send extra…
Jonathan Prior
  • 6,114
  • 7
  • 29
  • 26
8
votes
1 answer

Installing pycurl on MacOS. (link-time ssl backend (none/other) is different from compile-time ssl backend (openssl))

I'm trying to install pycurl in a venv on MacOS Sierra. I've cleaned things up, installed openssl via brew, told pip to link to that openssl installation and tried loading the module. It complains about "none/other" being different from…
Dave
  • 129
  • 1
  • 8
8
votes
1 answer

Saving output to file using pycurl?

I'm using pycurl to fetch a jpg from a server, how would I go about saving this to a file? I can't see an option to do it. Thanks!
OneSolitaryNoob
  • 5,423
  • 3
  • 25
  • 43
8
votes
2 answers

How to handle KeyboardInterrupt (Ctrl-c) nicely with pycurl?

I am writing a Python script using pycurl to consume Twitter's Sreaming API. Here's a short snippet that does exactly that (simply put your Twitter login/password to test it): import pycurl user = 'USER' password = 'PWD' def handleData(data): …
Wookai
  • 20,883
  • 16
  • 73
  • 86
1 2
3
40 41