Skip to content

Commit 7cf4445

Browse files
committed
Remove checks from function
1 parent b9c34b0 commit 7cf4445

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

Web Scraping using Python.ipynb

+6-10
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
},
2323
{
2424
"cell_type": "code",
25-
"execution_count": 1,
25+
"execution_count": 8,
2626
"metadata": {},
2727
"outputs": [],
2828
"source": [
@@ -44,18 +44,14 @@
4444
},
4545
{
4646
"cell_type": "code",
47-
"execution_count": 2,
47+
"execution_count": 9,
4848
"metadata": {},
4949
"outputs": [],
5050
"source": [
5151
"def getHTMLContent(link):\n",
52-
" try:\n",
53-
" html = urlopen(link)\n",
54-
" soup = BeautifulSoup(html, 'html.parser')\n",
55-
" return soup\n",
56-
" except URLError as e:\n",
57-
" print(\"Could not load the url: {}\\nError: {}\". format(link, e))\n",
58-
" return false"
52+
" html = urlopen(link)\n",
53+
" soup = BeautifulSoup(html, 'html.parser')\n",
54+
" return soup"
5955
]
6056
},
6157
{
@@ -69,7 +65,7 @@
6965
},
7066
{
7167
"cell_type": "code",
72-
"execution_count": 3,
68+
"execution_count": 10,
7369
"metadata": {},
7470
"outputs": [
7571
{

0 commit comments

Comments
 (0)