I'm currently trying to get a grasp on pycurl. I'm attempting to login to a website. After logging into the site it should redirect to the main page. However when trying this script it just gets returned to the login page. What might I be doing wrong?
import pycurl
import urllib
import StringIO
pf = {'username' : 'user', 'password' : '...
After doing a post to log into my website, I try to do a get on my the site and I get a bunch of garbage "�0������`&)��붋...." instead of the data from my site. Why is that? How do I fix that?
...
I have a python script which does a bunch of PUTs and POSTs, and when they are successful curl will output the updated html to stdout. I was wondering if there was a way to keep it from doing this? I don't really care about this information, so sending it to a file isn't necessary, but that seems to be the only solution I can find.
...
I am currently implementing code to call out to an API where the post request body needs to contain several columns of data in csv format.
e.g.
Col1, Col2, Col3
1, 2, 3
4, 5, 6
etc, with the content type header is set to 'text/csv'
How do I directly write to the request body?
I have a coworker who is doing the same thing as I am...
I am interested in getting the intermediate URLs in a redirect chain using pycURL. So, say I have a website, Site A, which redirects to Site B, which then redirects to Site C. Regularly I would only be able to see Site A (the starting URL) and Site C (the ending URL), however I am also interested in any sites that happen to reside in bet...
Newbie question: Python 2.6, Ubuntu 10.04, I can import both pycurl and curl, the former having different names for functions (set_option vs. setopt).
What's the difference between the two modules?
...
Hi all,
I can't install pycurl for python 2.6 on my server run CentOS 5. I use easy_install-2.6, but it output many errors.
output here: http://pastebin.com/Dw92H7fC
Help would be great. : )
...
I am working on a client for a web service using pycurl. The client opens a connection to a stream service and spawns it into a separate thread. Here's a stripped down version of how the connection is set up:
def _setup_connection(self):
self.conn = pycurl.Curl()
self.conn.setopt(pycurl.URL, FILTER_URL)
self.conn.setopt(py...
This PHP code below fetches html from server A to server B. I did this to circumvent the same-domain policy of browsers. (jQuery's JSONP can also be used to achieve this but I prefer this method)
<?php
/*
This code goes inside the body tag of server-B.com.
Server-A.com then returns a set of form tags to be echoed in the body tag...
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?
...