I wanted to write a piece of code like the following:
from bs4 import BeautifulSoup
import urllib2
url = 'http://www.thefamouspeople.com/singers.php'
html = urllib2.urlopen(url)
soup = BeautifulSoup(html)
But I found that I have to install urllib3
package now.
Moreover, I couldn't find any tutorial or example to understand how to rewrite the above code, for example, urllib3
does not have urlopen
.
Any explanation or example, please?!
P/S: I'm using python 3.4.
from urllib import urlopen
should work for this case. – Lunsfordimport urllib.request
urllib.request.urlopen('https://...')
– Flashback