urllib Questions
1
Solved
As asked in the title, are open('...','w').write('...') and urllib.urlopen('..') asynchronous calls?
1
Solved
I want a function that, when a button is clicked, it will take an image from the web using URLLIB and display it in a GUI using TKINTER.
I'm new to both URLLIB and TKINTER, so I'm having an incred...
Placido asked 22/5, 2011 at 5:37
1
I can't import urllib or urllib2 on my Python 2.6 or Python 2.7 installs.
Python 2.7.1+ (r271:86832, Apr 11 2011, 18:13:53)
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "li...
Pierrepierrepont asked 22/5, 2011 at 7:26
3
I'm looking to be able to query a site for warranty information on a machine that this script would be running on. It should be able to fill out a form if needed ( like in the case of say HP's serv...
Ticktacktoe asked 14/4, 2011 at 18:17
1
def make_req(data, url, method='POST')
params = urllib.urlencode(data)
headers = {"Content-type": "application/x-www-form-urlencoded",
"Accept": "text/plain",
}
conn = httplib.HTTPSConnectio...
3
Solved
I have the following simple code:
import urllib2
import sys
sys.path.append('../BeautifulSoup/BeautifulSoup-3.1.0.1')
from BeautifulSoup import *
page='http://en.wikipedia.org/wiki/Main_Page'
c=ur...
1
Solved
I'm porting over a program of mine from python2 to python3, and I'm hitting the following error: AttributeError: 'HTTPMessage' object has no attribute 'getdate'
Here's the code:
conn = urllib.req...
Bridoon asked 16/2, 2011 at 21:5
1
Solved
Looking through the docs my first guess was that I call urllib.request.HTTPCookieProcessor().cookiejar.clear(), however that didn't work. My next guess is maybe I need to subclass it and build/inst...
Refresh asked 15/2, 2011 at 23:53
1
Solved
I would need to know what is my final URL when following redirections using urllib in Python 3.
Let's say I've some code like :
opener = urllib.request.build_opener()
request = urllib.request.Req...
Hickey asked 9/2, 2011 at 14:34
3
Solved
Can someone help me parse a html file to get the links for all the images in the file in python?
Preferably with out a 3rd party module...
Thanks!
2
Solved
How can I urlencode a string with special chars æøå?
ex.
urllib.urlencode('http://www.test.com/q=testæøå')
I get this error :(..
not a valid non-string sequence or
mapping object
1
Solved
I want to send Chinese characters to be translated by an online service, and have the resulting English string returned. I'm using simple JSON and urllib for this.
And yes, I am declaring.
# -*-...
Honkytonk asked 8/9, 2010 at 15:40
3
Solved
I'm trying to make a POST request to retrieve information about a book.
Here is the code that returns HTTP code: 302, Moved
import httplib, urllib
params = urllib.urlencode({
'isbn' : '9780131185...
3
Solved
I am trying to implement PayPal IPN functionality. The basic protocol is as such:
The client is redirected from my site to PayPal's site to complete payment. He logs into his account, authorizes ...
2
Solved
how can I catch the 404 and 403 errors for pages in python and urllib(2), for example?
Are there any fast ways without big class-wrappers?
Added info (stack trace):
Traceback (most recent call l...
1
Solved
I'm trying to create a super-simplistic Virtual In / Out Board using wx/Python. I've got the following code in place for one of my requests to the server where I'll be storing the data:
data = url...
1
Solved
I'm using urllib2's urlopen function to try and get a JSON result from the StackOverflow api.
The code I'm using:
>>> import urllib2
>>> conn = urllib2.urlopen("http://api.stack...
2
I wrote a script that works with a proxy (py2.6x):
proxy_support = urllib2.ProxyHandler({'http' : 'http://127.0.0.1:80'})
But in py3.11x there is no urllib2 just a urllib... and that doesn't sup...
Middlemost asked 26/5, 2010 at 7:54
2
Solved
I am trying to retrieve a 500mb file using Python, and I have a script which uses urllib.urlretrieve(). There seems to some network problem between me and the download site, as this call consistent...
2
Solved
I would like to use Twisted non-blocking getPage method within a webapp, but it feels quite complicated to use such function compared to urlopen.
This is an example of what I'm trying to achive:
...
2
I just rented a VPS from Linode which has python2.5 and ubuntu 8.04. When I run this command from python shell:
import urllib
I get:
ImportError: No module named urllib
What can be the reason...
Spill asked 28/3, 2010 at 8:36
4
Solved
I am using python 2.5 on Ubuntu, and there's a machine in the same network called machine1. The folder is shared.
How to to get a file in a specific folder of that machine?
I have tried, with no ...
3
Solved
I'm trying to download a zip file ("tl_2008_01001_edges.zip") from an ftp census site using urllib. What form is the zip file in when I get it and how do I save it?
I'm fairly new to Python and do...
2
Solved
I thought that a post sent all the information in HTTP headers when you used post (I'm not well informed on this subject obviously), so I'm confused why you have to urlencode() the data to a key=va...
2
Solved
File "/usr/local/lib/python3.0/cgi.py", line 477, in __init__
self.read_urlencoded()
File "/usr/local/lib/python3.0/cgi.py", line 577, in read_urlencoded
self.strict_parsing):
File "/usr/local...
Cystotomy asked 12/2, 2009 at 7:24
© 2022 - 2024 — McMap. All rights reserved.