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

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, 'https://someurl.com') c.setopt(c.POSTFIELDS,…
Frtschaal
  • 75
  • 1
  • 1
  • 9
3
votes
2 answers

Best non-interactive approach to enter a string into a formular field and get the resulting text

In some website for which I have access, there are some input fields. In the sixth field I need to enter some input string from a list of 10000 strings, then a new page appears, for which I would just need to count the number of lines. Finally I…
Open the way
  • 26,225
  • 51
  • 142
  • 196
3
votes
2 answers

pycurl fails but curl (from bash) works in ubuntu

I'm using curl and pycurl to connect to a secure 3rd party api and when I use pycurl I'm getting authentication errors back from the server, but when I use curl on the command line and do the same thing it works. I set both to verbose mode and am…
ark
3
votes
1 answer

Python 3.7: pycurl installation on Windows 10

I've been trying to install pycurl but keep getting the following error. C:\>pip install pycurl Collecting pycurl Using cached https://files.pythonhosted.org/packages/e1/e2/xxx/pycurl-7.43.0.2.tar.gz Complete output from command python…
user9013730
3
votes
3 answers

Trouble finding library that supports http PUT in Python 2.7

I need to perform http PUT operations from python Which libraries have been proven to support this? More specifically I need to perform PUT on keypairs, not file upload. I have been trying to work with the restful_lib.py, but I get invalid results…
Skip Huffman
  • 5,239
  • 11
  • 41
  • 51
3
votes
0 answers

PyCharm won't install pycurl macOS High Sierra

I am trying to get pycurl to install on PyCharm for MacOS High Sierra, but I keep getting this error: __main__.ConfigurationError: Curl is configured to use SSL, but we have not been able to determine which SSL backend it is using. Please see…
SlupSax
  • 61
  • 6
3
votes
1 answer

How to cancel a curl request from a WRITEFUNCTION?

I have a curl request in python which outputs a large amount of data to a writefunction (CURLOPT_WRITEFUNCTION). I want to be able to cancel the curl request from the writefunction if a certain condition is met. I've tried using ch.close(), but that…
Cameron Martin
  • 5,952
  • 2
  • 40
  • 53
3
votes
4 answers

Handle pycurl hang on Twitter streaming api

I am using pycurl to connect to the twitter streaming API. This works well but sometimes after running for a few hours it will stop hang indefinitely, not throwing any exceptions. How can I detect/handle a hang in this script? import pycurl,…
ʞɔıu
  • 47,148
  • 35
  • 106
  • 149
3
votes
1 answer

libcurl link-time ssl backend (openssl) is different from compile-time ssl backend (none/other)

My system is macOS 10.13.1 I was try import pycurl is error ImportError: pycurl: libcurl link-time ssl backend (openssl) is different from compile-time ssl backend (none/other) I tried these two methods sudo pip uninstall pycurl export…
jianyi
  • 151
  • 1
  • 3
  • 11
3
votes
3 answers

Problems POST-ing with pyCurl

i'm trying to POST a file to a webservice using CURL (that's what I need to use so I can't take twisted or something else). The problem is that when using pyCurl the webservice doesn't receive the file i'm sending, as in the case commented at the…
rsavu
  • 601
  • 1
  • 7
  • 11
3
votes
1 answer

Weird behavior when doing POST by PyCurl

I have a simple code to post data to a remote server: def main(): headers = {} headers['Content-Type'] = 'application/json' target_url = r'the_url' data = {"bodyTextPlain": "O estimulante concorrente dos azulzinhos\r\nConhe\u00e7a…
pppk520
  • 517
  • 4
  • 15
3
votes
1 answer

How to determine what fields are required by a REST API, from the API?

I'm working with a networking appliance that has vague API documentation. I'm able to execute PATCH and GET requests fine, but POST isn't working. I receive HTTP status error 422 as a response, I'm missing a field in the JSON request, but I am…
LampShade
  • 93
  • 2
  • 11
3
votes
1 answer

PyCurl TypeError: invalid argument to setopt

I'm using PyCurl to send POST request with file as an attachment: d = pycurl.Curl() d.setopt(pycurl.URL, url) # d.setopt(pycurl.RETURNTRANSFER, True) d.setopt(pycurl.POST, True) d.setopt(pycurl.POSTFIELDS, {filename: "@" + filename}) b =…
Павел Иванов
  • 1,863
  • 5
  • 28
  • 51
3
votes
1 answer

Python: Upload a file in chunk to a server including additional fields

I excuse myself right here... I am a HTTP noob... but I need to create a python script that takes a file and uploads it to a server in chunks including additional data. EDIT: It's only one file that I want to upload... but in chunks So I started…
Georg
  • 3,664
  • 3
  • 34
  • 75
3
votes
1 answer

Pycurl PUT request to JIRA REST API waiting on 100 continue

I am trying to change the assignee in JIRA using pycurl. My code is waiting on ****HTTP/1.1 100 Continue****. What am I doing wrong? Thanks for your help. I have attached a snippet of my code below. Also I do not want to use the JIRA Python…
HighonH
  • 169
  • 3
  • 16