Python 3 Programming Tutorial - urllib module

preview_player
Показать описание
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. Through urllib, you can access websites, download data, parse data, modify your headers, and do any GET and POST requests you might need to do.

Bitcoin donations: 1GV7srgR4NJx4vrk7avCmmVQQrqmv87ty6
Рекомендации по теме
Комментарии
Автор

That moment when you think to fool Google and you doors start opening ... XD

himself
Автор

Coming back years later to refresh on urllib for a project I'm working on. It's crazy to see how much the channel has changed since this video. Cheers to you bud.

brandonmerrithew
Автор

For anyone interested in making one-liners, I found out that you can say:

# ...
data =
# ...

Oooo, RegEx! Looking forward to that :D I learned a little bit when I learned 'Sequel' XD  But that was like a year ago. It'll help me with my Django programming as well I'm sure.

Also, you probably already know this, but if you're in the command prompt or in Terminal running a Python interpreter, for Python 3.4 at least (not sure about other versions of 3), you can press tab and get an auto complete!

Great videos! Python is just so awesome!!! There was a library based around urllib I believe called "Mechanize". There's another one which I believe is more modern and more well maintained (but I don't think it works with 3.X, whereas I'm almost sure Mechanize does) and more Pythonic, called Scrapy, so you could check that out :D

sonickk
Автор

Hey love your videos, Just wanted to say the look on your face when your dog opened the patio door was priceless... Wasn't expecting it and it caught me funny.

DallasSpohn
Автор

This is the dream comment section.Everyone is so nice and grateful.Good video man!

parinmistry
Автор

This User-Agent string worked for me:
Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.62 Safari/537.36

You can basically find a plethora of user-agent strings to play around with on here:

abhishekmann
Автор

Fantastic Tutorial man ! I've been struggeling on that issue for 3 days, now thanks to you I can carry on my web scrapping !!

mahmutajdren
Автор

FYI: I was stuck on getting the 'User Agent' information to work? Google would not let me access...

The code for the user agent in this tutorial didn't work for me- 'Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.27 Safari/537.17'

I checked the other postings, and googled 'User-Agent for Google ', I was lucky enough to find a 'User-Agent Switcher' add-on for Google Chrome.

Installed it and pressed a field called "Show User-Agent" did a copy and paste and it worked great!

Thanks again for another great video!

Rafael G.

Ralph
Автор

Hey mate, your tutorials are awesome! You have got a great feeling of what to explain and how to explain it. Keep on the good work!

Purger
Автор

Just found out about this channel today - and i've already bookmarked the channel as "Snowden the second"

gfawkes
Автор

this is the clearest explanation of urllib on youtube! you are the best!!!

willlywillly
Автор

First of all, just wanted to say that you are the best YouTuber to watch for python assistance, and I honestly learn more from your videos than all other material out there combined. This being said, (you mentioned BeautifulSoup in this video) I read through the documentation of BeautifulSoup and I am finding myself a little (who am i kidding *very) lost and was wondering if maybe you could do a small series on BeautifulSoup? Your series on django was super great and all of the pygame tutorials you have done really helped me learn and progress as a programmer, and I was just wondering if maybe you could help me with BeautifulSoup. THANK YOU SO MUCH!!

reesegyllenhammer
Автор

Make a series on Advance Python 3. Cover all the hacky things in that series.

hussamcheema
Автор

Great video! I've really been enjoying this video series -- especially the ones on the modules in the Python standard library. I'm not sure how interested you would be in this, but I think it would be cool if you suggested a simple project at the end of the tutorial video that allows us to get some practice with the module. Anyways, excited for more to come.

SBMike
Автор

Man, i really love the videos and you :P
They are just so to the point and clear, I think I will become python expert because of you one day!

alishaaneja
Автор

Thanks a bunch for showing me! I have searched everywhere for how to open urls in python 3, but none of what I found was correct.

poryg
Автор

Harisson the God of Novice, Your Explanation Ways are pretty awesome, Got no option but to subscribe to your channel . Cheerz and Keep the good work going .

sanchayana
Автор

Great videos, I am just getting back into programming and the ten minute format makes for easy reference. Keep up the quality content!

vintagehouseling
Автор

men i love you, you're teaching me all i ever wanted

santiagobassani
Автор

Is someone also getting "ImportError: No module named request"? I've searched this in some forums but I haven't found yet.

and I agree with Reese Gyllenhammer, you're the best YouTuber :D

gabiayako
visit shbcf.ru