c# .net Adsense ADO.NET Linq Viruses/security asp.net MVC JQuery Angular-js Node-js SEO Java C++ SQL API Networking vb.net .Net Css JavaScript Generics c#.Net entity framework HTML Website host Website Construction Guide HTTP tutorial W3C tutorial Web Services JSON Psychology Ionic framework Angular ReactJS Python Computer Android
Python

AttributeError: module 'urllib' has no attribute 'request' - Python

| | python

I got this following error while running the python program. 

"AttributeError: module 'urllib' has no attribute 'request'"

SOURCE CODE: https://stackoverflow.com/questions/43982002/extract-the-src-attribute-from-an-img-tag-using-beautiful-soup

CODE:

from bs4 import BeautifulSoup as BSHTML

import urllib

page = urllib.request.urlopen('https://github.com/abushoeb/emotag')
soup = BSHTML(page)
images = soup.findAll('img')

for image in images:
# Print image source
print(image['src'])
# Print alternate text
print(image['alt'])

UPDATED CODE:

import urllib.request

VIDEO GUIDE: