diff --git a/1-Introduction/01-defining-data-science/notebook.ipynb b/1-Introduction/01-defining-data-science/notebook.ipynb index 0e9199fc..fb503a19 100644 --- a/1-Introduction/01-defining-data-science/notebook.ipynb +++ b/1-Introduction/01-defining-data-science/notebook.ipynb @@ -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": [