urllib Questions

9

Solved

Trying to install pip on a new python installation. I am stuck with proxy errors. Looks like a bug in get-pip or urllib3?? Question is do I have to go through the pain of setting up CNTLM as descr...
Bracteole asked 29/9, 2014 at 21:31

2

I am trying to run a script in python3 (tried with 3.7.4 and 3.8.0) which uses urllib.request and urllib.error. I tried importing in the following ways: import urllib and from urllib import reques...
Margret asked 25/11, 2021 at 17:42

3

Solved

Here is my problem with urllib in python 3. I wrote a piece of code which works well in Python 2.7 and is using urllib2. It goes to the page on Internet (which requires authorization) and grabs me...
Reggy asked 8/7, 2014 at 14:54

3

Solved

I am new to python. I'm confused by the <class 'str'>. I got a str by using: response = urllib.request.urlopen(req).read().decode() The type of 'response' is <class 'str'>, not <t...
Afeard asked 5/2, 2017 at 2:59

3

How to get cookie from an urllib.request? import urllib.request import urllib.parse data = urllib.parse.urlencode({ 'user': 'user', 'pass': 'pass' }) data = data.encode('utf-8') request = urll...
Electrophysiology asked 8/8, 2014 at 18:41

4

Solved

While porting code from python2 to 3, I get this error when reading from a URL TypeError: initial_value must be str or None, not bytes. import urllib import json import gzip from urllib.parse...
Subclass asked 26/6, 2015 at 4:33

7

Solved

I found this script online: import httplib, urllib params = urllib.urlencode({'number': 12524, 'type': 'issue', 'action': 'show'}) headers = {"Content-type": "application/x-www-form-urlencoded", ...
Polymerize asked 4/7, 2012 at 4:30

4

Solved

I'm currently writing a script that downloads a file from a URL import urllib.request urllib.request.urlretrieve(my_url, 'my_filename') The docs urllib.request.urlretrieve state: The following fu...
Barnabe asked 22/2, 2013 at 23:42

20

So I'm trying to make a Python script that downloads webcomics and puts them in a folder on my desktop. I've found a few similar programs on here that do something similar, but nothing quite like w...
Integral asked 15/6, 2010 at 5:35

2

Solved

I am trying to download a CSV file with Python 3.x The path of the file is: https://www.nseindia.com/content/fo/fo_mktlots.csv I have found three ways to do it. Of the three only one method works....
Resound asked 29/1, 2017 at 8:57

2

Solved

I'm attempting to connect to a website that requires you to have a specific cookie to access it. For the sake of this question, we'll call the cookie 'required_cookie' and the value 'required_value...
Meetly asked 4/8, 2018 at 4:10

4

Solved

I'm using Python 3 and I'm trying to retrieve data from a website. However, this data is dynamically loaded and the code I have right now doesn't work: url = eveCentralBaseURL + str(mineral) print...
Quincuncial asked 11/7, 2013 at 15:24

5

Solved

Why isn't this simple Python code working? import urllib file = urllib.urlopen('http://www.google.com') print file.read() This is the error that I get: Traceback (most recent call last): File ...
Megaphone asked 27/5, 2010 at 18:15

9

Solved

If I have a URL that, when submitted in a web browser, pops up a dialog box to save a zip file, how would I go about catching and downloading this zip file in Python?
Genu asked 23/2, 2012 at 18:42

2

Solved

import urllib.request request = urllib.request.Request('http://1.0.0.8/') try: response = urllib.request.urlopen(request) print("Server Online") #do stuff here except urllib.error.HTTPError as ...
Ockham asked 25/6, 2018 at 13:53

2

Solved

I am using python url library to get json response from spatial reference website.This is my code. I get response_read="u'{\'type\': \'EPSG\', \'properties\': {\'code\': 102646}}'" but i need this ...
Seabolt asked 19/7, 2017 at 14:18

3

Solved

I am trying to access an intranet site with HTTP Basic Authentication enabled. Here's the code I'm using: from bs4 import BeautifulSoup import urllib.request, base64, urllib.error request = urll...
Grandam asked 7/11, 2017 at 12:1

8

Solved

How do I download a file with progress report using python but without supplying a filename. I have tried urllib.urlretrieve but I seem to have to supply a filename for the downloaded file to save...
Louanne asked 8/5, 2010 at 19:28

6

Solved

I am trying to automate download of historic stock data using python. The URL I am trying to open responds with a CSV file, but I am unable to open using urllib2. I have tried changing user agent a...
Electrothermal asked 9/11, 2012 at 6:51

13

Solved

I'm trying to use Python to download the HTML source code of a website but I'm receiving this error. Traceback (most recent call last): File "C:\Users\Sergio.Tapia\Documents\NetBeansProjects\DI...
Ursala asked 19/10, 2010 at 14:59

7

Solved

Things were running along fine until one of my projects started printing this everywhere, at the top of every execution, at least once: local/lib/python2.7/site-packages/cryptography/hazmat/primit...
Anson asked 10/8, 2018 at 3:59

3

Goal: Pass a search string to search on google and scrape url, title and the small description that get publish along with the url title. I have following code and at the moment my code only give...
Skepful asked 16/7, 2012 at 22:39

3

Solved

I have a script that I'd like to continue using, but it looks like I either have to find some workaround for a bug in Python 3, or downgrade back to 2.6, and thus having to downgrade other scripts ...
Subfusc asked 27/12, 2008 at 21:45

4

I'm trying to get a queried-excel file from a site. When I enter the direct link, it will lead to a login page and once I've entered my username and password, it will proceed to download the excel ...
Flogging asked 18/7, 2014 at 23:15

3

Solved

How do I include my automatic proxy config file in HTTP libraries like urllib or requests. pacfile = 'http://myintranet.com/proxies/ourproxies.pac' proxy = urllib3.ProxyManager(????????????????) ...
Courtly asked 21/7, 2015 at 1:16

© 2022 - 2024 — McMap. All rights reserved.