httplib Questions

1

it's a piece of web mining script. def printer(q,missing): while 1: tmpurl=q.get() try: image=urllib2.urlopen(tmpurl).read() except httplib.HTTPException: missing.put(tmpurl) continue wf=o...
Spurtle asked 13/8, 2012 at 6:22

1

Solved

I'm trying to use HTTPConnection (2.7.8) to make a request and I've set the timeout to 10 with HTTPConnection(host, timeout=10). However, HTTPConnection.request() doesn't seem to timeout after 10 s...
Lubet asked 23/2, 2015 at 8:43

2

I'd like to collect statistics related to how long each phase of a web request takes. httplib offers: def run(self): conn = httplib.HTTPConnection('www.example.com') start = time.time() conn.r...
Panter asked 20/8, 2012 at 12:39

4

Solved

For example, if I go to www.yahoo.com/thispage, and yahoo has set up a filter to redirect /thispage to /thatpage. So whenever someone goes to /thispage, they will land on /thatpage. If I use httpli...
Jackson asked 20/11, 2012 at 21:47

1

I am trying to POST chunked encoded data to httpbin.org/post. I tried two options: Requests and httplib Using Requests #!/usr/bin/env python import requests def gen(): l = range(130) for i in...
Hinkle asked 15/7, 2013 at 19:9

2

Solved

I'm trying to make a connection to this website "android-review.googlesource.com" through "httplib.HTTPSConnection" which actually is Gerrit (a tool for reviewing code), Gerrit API provides an inte...
Karyosome asked 4/7, 2014 at 21:54

1

This is probably a very dumb question, but I have been staring at this for hours and can't find what I'm doing wrong. I am trying to use Python to authenticate with the Facebook API, but am having...
Wedurn asked 18/6, 2012 at 1:37

2

Solved

I just want a function that can take 2 parameters: the URL to POST to a dictionary of parameters How can this be done with httplib? thanks.
Elias asked 3/3, 2010 at 9:27

0

I have following code snippet. Previously it was working fine and was printing output But after now when i did change my machine's phisical loaction location within same network I get error: [Err...
Dimetric asked 6/2, 2013 at 10:11

1

Solved

I am intermittently receiving a httplib.CannotSendRequest exception when using a chain of SimpleXMLRPCServers that use the SocketServer.ThreadingMixin. What I mean by 'chain' is the following: I ...
Consolidation asked 23/11, 2012 at 18:34

2

Solved

I am trying to get the final url of a page that seems to redirect more than once. Try this sample URL in your browser and compare it to the final URL at the bottom of my code snippet: Link that re...
Mesencephalon asked 28/5, 2011 at 0:34

2

These docs do not say what the maximum debug level is. I need to know that.
Paul asked 6/7, 2012 at 21:46

1

Solved

URL = "MY HTTP REQUEST URL" XML = "<port>0</port>" parameter = urllib.urlencode({'XML': XML}) response = urllib.urlopen(URL, parameter) print response.read() IOError: ('http protocol...
Norvan asked 22/5, 2012 at 19:32

4

Is there a way to make a request using the PATCH HTTP method in Python? I tried using httplib, but it doesn't accept PATCH as method param.
Accustom asked 28/7, 2011 at 1:2

1

Solved

I try to post unicode data with the httplib.request function: s = u"עברית" data = """ <spellrequest textalreadyclipped="0" ignoredups="1" ignoredigits="1" ignoreallcaps="0"> <text>%s&l...
Trigeminal asked 14/4, 2012 at 0:28

3

Solved

I am currently working with a piece of code that has been written by somebody else. It uses httplib to make requests to server. It has all the data supplied in a correct format - for example messag...
Wirth asked 10/6, 2011 at 23:12

1

Solved

Trying to get a login script working, I kept getting the same login page returned, so I turned on debugging of the http stream (can't use wireshark or the like because of https). I got nothing, so...
Jim asked 2/7, 2011 at 16:41

2

Solved

I'm trying to use httplib's HTTPSConnection for client validation, using a PKCS #12 certificate. I know the certificate is good, as I can connect to the server using it in MSIE and Firefox. Here's...
Sirloin asked 13/4, 2010 at 13:48

4

Solved

I'm trying to use httplib to send credit card information to authorize.net. When i try to post the request, I get the following traceback: File "./lib/cgi_app.py", line 139, in run res = method() ...
Fetial asked 12/1, 2011 at 19:33

1

Solved

I'm looking for information on thread safety of urllib2 and httplib. The official documentation (http://docs.python.org/library/urllib2.html and http://docs.python.org/library/httplib.html) lacks a...
Jaime asked 28/4, 2011 at 21:17

2

In python, I'm using httplib because it "keep-alive" the http connection (as oppose to urllib(2)). Now, I want to use cookielib with httplib but they seem to hate each other!! (no way to interface ...
Khosrow asked 19/6, 2009 at 7:32

© 2022 - 2024 — McMap. All rights reserved.