urllib Questions

4

I want to open and read https://yande.re/ with urllib.request, but I'm getting an SSL error. I can open and read the page just fine using http.client with this code: import http.client conn = htt...
Rafaelrafaela asked 21/5, 2012 at 1:43

4

Here is a related question but I could not figure out how to apply the answer to mechanize/urllib2: how to force python httplib library to use only A requests Basically, given this simple code: #...
Saguache asked 6/1, 2010 at 16:43

3

Solved

The title pretty much says it all. Here's my code: from urllib2 import urlopen as getpage print = getpage("www.radioreference.com/apps/audio/?ctid=5586") and here's the traceback error I get: T...
Gause asked 30/11, 2012 at 8:54

3

Solved

In order to download files, I'm creating a urlopen object (urllib2 class) and reading it in chunks. I would like to connect to the server several times and download the file in six different sessi...
Swearword asked 25/1, 2012 at 17:45

3

I imported two libraries urllib and from urllib.request import urlopen. The second one is contained in the first When I went over the code and tried to remove the from urllib.request import urlop...
Ravo asked 24/10, 2012 at 16:8

2

I have a program that runs lots of urllib requests IN AN INFINITE LOOP, which makes my program really slow, so I tried putting them as threads. Urllib uses cpython deep down in the socket module, s...
Brahui asked 1/9, 2012 at 14:55

3

Solved

I am downloading files over http and displaying the progress using urllib and the following code - which works fine: import sys from urllib import urlretrieve urlretrieve('http://example.com/file...
Lightface asked 23/8, 2012 at 13:5

3

Solved

I'm working with urllib and urllib2 in python and am using them to retrieve images from urls. Using something similar to : try: buffer=urllib2.url_open(urllib2.Request(url)) f.write(buffer) f...
Indiraindirect asked 28/7, 2012 at 0:47

1

I have a server and I am trying to build a post request to get the data back. I think one way to achieve this is to add the parameters in the header and make the request. But I am getting few error...
Goar asked 18/7, 2012 at 22:23

1

Solved

I'm using Python 3.2.3's urllib.request module to download Google search results, but I'm getting an odd error in that urlopen works with links to Google search results, but not Google Scholar. In ...
Adin asked 14/7, 2012 at 13:42

4

Solved

How can I post an image to Facebook using Python?
Ebracteate asked 25/2, 2011 at 14:8

1

Solved

I'm trying to make a program that will open a directory, then use regular expressions to get the names of powerpoints and then create files locally and copy their content. When I run this it appear...
Greenaway asked 4/6, 2012 at 0:51

1

Solved

I am trying to download some PDF's automatically on a site (http://bibliotecadigitalhispanica.bne.es) using Python. I've tried using the urllib/urllib2/mechanize modules (which I have been using f...
Lactoprotein asked 16/3, 2012 at 9:55

4

I am using Python 3.2. I can import "urllib" library just like with 2.x version. But I can't find methods such as urlopen, urlretrieve, etc. What gives? How do I retrieve a webpage on v3.2? I have...
Schism asked 13/5, 2011 at 6:52

1

Solved

I have just started using urllib3, and I am running into a problem straightaway. According to their manuals, I started off with the simple example: Python 2.7.1+ (r271:86832, Apr 11 2011, 18:13:53...
Psychochemical asked 26/1, 2012 at 16:8

4

Solved

I'm writing a script(multi-threaded) to retrieve contents from a website, and the site's not very stable so every now and then there's hanging http request which cannot even be time-outed by socket...
Concinnity asked 11/12, 2011 at 13:42

1

Solved

Is that possible to fetch only a number of bytes from some URL and then close the connection with urllib/urllib2? Or even may be a part from n-th byte to k-th? There is a page on that side and I do...
Pageantry asked 30/10, 2011 at 11:47

4

for the following code theurl = "https://%s:%[email protected]/nic/update?hostname=%s&myip=%s&wildcard=NOCHG&mx=NOCHG&backmx=NOCHG" % (username, password, hostname, theip) co...
Vierra asked 28/7, 2010 at 8:54

3

Solved

I want to click a button with python, the info for the form is automatically filled by the webpage. the HTML code for sending a request to the button is: INPUT type="submit" value="Place a Bid"&gt...
Doom asked 3/10, 2011 at 3:26

1

Solved

I want to download all files from an internet page, actually all the image files. I found the 'urllib' module to be what I need. There seems to be a method to download a file, if you know the filen...
Lungi asked 1/10, 2011 at 7:57

2

Solved

I'm having quite a bit of trouble with Python's documentation. Is there anything like the Mozilla Developer Network for it? I'm doing a Python puzzle website and I need to be able to read the cont...
Declinometer asked 1/10, 2011 at 1:56

3

Solved

I am learning about urllib2 by following this tutorial http://docs.python.org/howto/urllib2.html#urlerror Running the code below yields a different outcome from the tutorial import urllib2 req = ...
Machado asked 26/9, 2011 at 12:10

3

Solved

In Python I can use urllib2 (and urllib) to open external URLs such as Google. However, I am hitting issues when opening localhost URLs. I have a python SimpleHTTPServer running on port 8280 which ...
Frederigo asked 10/8, 2011 at 14:12

2

Solved

I'm trying to retrieve the source of a webpage, including any images. At the moment I have this: import urllib page = urllib.urlretrieve('http://127.0.0.1/myurl.php', 'urlgot.php') print urlgot.p...
Hyssop asked 5/9, 2011 at 20:58

3

I have made a program using urllib2 that makes a lot of connections across the web. I noticed that eventually that this can be DDoS worthy; I would like to know how to close down each connect...
Chesney asked 5/7, 2011 at 23:23

© 2022 - 2024 — McMap. All rights reserved.