|
|
|
|
@ -44,7 +44,12 @@
|
|
|
|
|
"source": [
|
|
|
|
|
"import requests\r\n",
|
|
|
|
|
"\r\n",
|
|
|
|
|
"text = requests.get(url).content.decode('utf-8')\r\n",
|
|
|
|
|
"headers = {\r\n",
|
|
|
|
|
" 'User-Agent': 'DataScienceForBeginners/1.0 (https://github.com/microsoft/Data-Science-For-Beginners)'\r\n",
|
|
|
|
|
"}\r\n",
|
|
|
|
|
"response = requests.get(url, headers=headers)\r\n",
|
|
|
|
|
"response.raise_for_status()\r\n",
|
|
|
|
|
"text = response.content.decode('utf-8')\r\n",
|
|
|
|
|
"print(text[:1000])"
|
|
|
|
|
],
|
|
|
|
|
"outputs": [
|
|
|
|
|
|