Skip to content

Commit bf1c995

Browse files
committed
fixes pep8 E231 and W291
1 parent 48be599 commit bf1c995

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

code3/urllink2.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# To run this, you can install BeautifulSoup
1+
# To run this, you can install BeautifulSoup
22
# https://pypi.python.org/pypi/beautifulsoup4
33

44
# Or download the file
@@ -12,15 +12,15 @@
1212
html = urlopen(url).read()
1313

1414
# html.parser is the HTML parser included in the standard Python 3 library.
15-
# information on other HTML parsers is here:
16-
#http://www.crummy.com/software/BeautifulSoup/bs4/doc/#installing-a-parser
15+
# information on other HTML parsers is here:
16+
# http://www.crummy.com/software/BeautifulSoup/bs4/doc/#installing-a-parser
1717
soup = BeautifulSoup(html, "html.parser")
1818

1919
# Retrieve all of the anchor tags
2020
tags = soup('a')
2121
for tag in tags:
2222
# Look at the parts of a tag
23-
print('TAG:',tag)
24-
print('URL:',tag.get('href', None))
25-
print('Contents:',tag.contents[0])
26-
print('Attrs:',tag.attrs)
23+
print('TAG:', tag)
24+
print('URL:', tag.get('href', None))
25+
print('Contents:', tag.contents[0])
26+
print('Attrs:', tag.attrs)

0 commit comments

Comments
 (0)