Skip to content

Commit 2bd8786

Browse files
committed
Minor formatting
1 parent 235bbe7 commit 2bd8786

File tree

5 files changed

+534
-420
lines changed

5 files changed

+534
-420
lines changed

v2/Chapter01_BeginningToScrape.ipynb

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"source": [
1717
"from urllib.request import urlopen\n",
1818
"\n",
19-
"html = urlopen(\"http://pythonscraping.com/pages/page1.html\")\n",
19+
"html = urlopen('http://pythonscraping.com/pages/page1.html')\n",
2020
"print(html.read())"
2121
]
2222
},
@@ -37,9 +37,9 @@
3737
"from urllib.request import urlopen\n",
3838
"from bs4 import BeautifulSoup\n",
3939
"\n",
40-
"html = urlopen(\"http://www.pythonscraping.com/pages/page1.html\")\n",
41-
"bsObj = BeautifulSoup(html.read(), \"html.parser\")\n",
42-
"print(bsObj.h1)"
40+
"html = urlopen('http://www.pythonscraping.com/pages/page1.html')\n",
41+
"bs = BeautifulSoup(html.read(), 'html.parser')\n",
42+
"print(bs.h1)"
4343
]
4444
},
4545
{
@@ -60,8 +60,6 @@
6060
"from urllib.error import HTTPError\n",
6161
"from urllib.error import URLError\n",
6262
"\n",
63-
"from bs4 import BeautifulSoup\n",
64-
"\n",
6563
"try:\n",
6664
" html = urlopen(\"https://pythonscrapingthisurldoesnotexist.com\")\n",
6765
"except HTTPError as e:\n",

0 commit comments

Comments
 (0)