Tag: urllib
Posts of Tag: urllib
  1. A multi-part/threaded downloader via python?

    I've seen a few threaded downloaders online, and even a few multi-part downloaders (HTTP). I haven't seen them together as a class/function. If any of you have a class/function lying around, that I can just d...Learn More
    PythonMultithreadingDownloadurllibmultipart
  2. Can’t download youtube video

    I’m having trouble retrieving the Youtube video automatically. Here’s the code. The problem is the last part. download = urllib.request.urlopen(download_url).read() # Youtube video download script # 10n...Learn More
    Pythonurllibpython-3.xfile
  3. Python urllib, minidom and parsing international characters

    When I try to retrieve information from Google weather API with the following URL, http://www.google.com/ig/api?weather=Munich,Germany&hl=de and then try to parse it with minidom, I get error that the docum...Learn More
    PythonInternationalizationurllibminidom
  4. urllib2.urlopen() vs urllib.urlopen() - urllib2 throws 404 while urllib works! WHY?

    import urllib print urllib.urlopen('http://www.reefgeek.com/equipment/Controllers_&_Monitors/Neptune_Systems_AquaController/Apex_Controller_&_Accessories/').read() The above script works and r...Learn More
    PythonURLurlliburllib2http-status-code-404
  5. Urllib and concurrency - Python

    I'm serving a python script through WSGI. The script accesses a web resource through urllib, computes the resource and then returns a value. Problem is that urllib doesn't seem to handle many concurrent reques...Learn More
    PythonHTTPconcurrencyWsgiurllib
  6. Django: add image in an ImageField from image url

    please excuse me for my ugly english ;-) Imagine this very simple model : class Photo(models.Model): image = models.ImageField('Label', upload_to='path/') I would like to create a Photo from an image URL (...Learn More
    PythonDjangourllibdjango-models
  7. Python: fetching SVG file using urllib is returning binary when I need ASCII

    I'm using urllib (in Python) to fetch an SVG file: import urllib urllib.urlopen('http://alpha.vectors.cloudmade.com/BC9A493B41014CAABB98F0471D759707/-122.2487,37.87588,-122.265823,37.868054?styleid=1&v...Learn More
    PythonASCIIurllibbinary-data
  8. Form Submission in Python Without Name Attribute

    Background: Using urllib and urllib2 in Python, you can do a form submission. You first create a dictionary. formdictionary = { 'search' : 'stackoverflow' } Then you use urlencode method of urllib to transfo...Learn More
    PythonFormsurlliburllib2
  9. Trace/BPT trap when calling urllib.urlopen

    For some reason I'm getting a Trace/BPT trap error when calling urllib.urlopen. I've tried both urllib and urllib2 with identical results. Here is the code which throws the error: def get_url(url): from url...Learn More
    Pythonurlliburllib2web.pytrace
  10. Turning on debug output for python 3 urllib

    In python 2, it was possible to get debug output from urllib by doing import httplib import urllib httplib.HTTPConnection.debuglevel = 1 response = urllib.urlopen('http://example.com').read() However, in pytho...Learn More
    PythonHTTPDebuggingurllibpython-3.x
  11. python urllib, how to watch messages?

    How can I watch the messages being sent back and for on urllib shttp requests? If it were simple http I would just watch the socket traffic but of course that won't work for https. Is there a debug flag I can...Learn More
    PythonHTTPSurllib
  12. How to ignore "Enter username for Private Proxy Access" prompt?

    I'm using urllib.urlopen with some http proxies and sometimes (probably when they require authorization) I get the following prompt printed into the console: Enter username for Private Proxy Access (country) at...Learn More
    PythonProxyurllib