from urllib.request import urlopen
from bs4 import BeautifulSoup

html = urlopen("http://pythonscraping.com/pages/page2.html")
bsObj = BeautifulSoup(html, 'lxml')
tags = bsObj.findAll(lambda tag: len(tag.attrs) == 2)
for tag in tags:
    print(tag)

41bbb23b9b8c6b9a5da8ee9fb00ca305be4f9090
<mask token>

<mask token>
for tag in tags:
    print(tag)

<mask token>
html = urlopen('http://pythonscraping.com/pages/page2.html')
bsObj = BeautifulSoup(html, 'lxml')
tags = bsObj.findAll(lambda tag: len(tag.attrs) == 2)
for tag in tags:
    print(tag)

from urllib.request import urlopen
from bs4 import BeautifulSoup
html = urlopen('http://pythonscraping.com/pages/page2.html')
bsObj = BeautifulSoup(html, 'lxml')
tags = bsObj.findAll(lambda tag: len(tag.attrs) == 2)
for tag in tags:
    print(tag)

from urllib.request import urlopen
from bs4 import BeautifulSoup

html = urlopen("http://pythonscraping.com/pages/page2.html")
bsObj = BeautifulSoup(html, 'lxml')
tags = bsObj.findAll(lambda tag: len(tag.attrs) == 2)
for tag in tags:
    print(tag)
