Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

urllib.urlretrieve file python 3.3

Tags:

People also ask

Is Urllib built in Python 3?

The urllib module in Python 3 allows you access websites via your program. This opens up as many doors for your programs as the internet opens up for you. urllib in Python 3 is slightly different than urllib2 in Python 2, but they are mostly the same.

How do I import Urlretrieve into Python?

The urlretrieve() function provided by the urllib module. The urlretrieve () method downloads the remote data directly to the local. The parameter filename specifies the save local path (if the parameter is not specified, urllib will generate a temporary file to save the data.)


I know I have seen the answer somewhere a couple of weeks ago but I can't find it now.

Simple urllib.urlretrieve in Python 3.3. How do you do it? I'm trying to download an mp4/html(Page does not exist) scenario, either the page if it does not exist or the mp4 if it does(I can delete the file if the file size is to small or keep it otherwise).

The code I have runs fine and does exactly what I want it to do in 2.7, but it doesn't work in 3.3.

I'm dealing with both giving me headaches, Tkinter and urllib between the two version of Python. Tkinter works fine in 3.3, but urllib doesn't and urllib works fine in 2.7 but Tkinter doesn't. How do I get this to download correctly in 3.3?

I know 3.3 has changed the urllib but I can't find what I saw a week or two ago to guide me in the correct direction.

2.7 does pretty much nothing when I add the Tkinter change over in and 3.3 just comes up and gives me urllib doesn't have an attribute 'urlretrieve;. I prefer 3.3.