Skip to content

Commit

Permalink
feat: fix footnote numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
lorae committed Jun 18, 2024
1 parent 20b49ae commit e5ad4d7
Showing 1 changed file with 18 additions and 27 deletions.
45 changes: 18 additions & 27 deletions slides/advanced-web-scraping.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": null,
"metadata": {
"slideshow": {
"slide_type": "notes"
Expand All @@ -22,16 +22,7 @@
"languageId": "powershell"
}
},
"outputs": [
{
"ename": "SyntaxError",
"evalue": "invalid syntax (957921146.py, line 1)",
"output_type": "error",
"traceback": [
"\u001b[1;36m Cell \u001b[1;32mIn[5], line 1\u001b[1;36m\u001b[0m\n\u001b[1;33m jupyter nbconvert 'slides/advanced-web-scraping.ipynb' --to slides --output='../advanced-web-scraping'\u001b[0m\n\u001b[1;37m ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n"
]
}
],
"outputs": [],
"source": [
"jupyter nbconvert 'slides/advanced-web-scraping.ipynb' --to slides --output='../advanced-web-scraping'"
]
Expand Down Expand Up @@ -448,10 +439,10 @@
"\n",
"After downloading all the external resources needed to build the webpage, your browser will compile and execute any JavaScript code that it received.\n",
"\n",
"With all the downloaded elements in place, the browser processes the HTML, the CSS style sheets, and combines it with other resources (such as downloaded fonts, photos, videos, and data downloaded from APIs) to **paint** the webpage to your screen.<sup id=\"ref05\" class=\"reference\"><a href=\"https://developer.mozilla.org/en-US/docs/Web/Performance/How_browsers_work\" title=\"Mozilla (2023). Populating the page: how browsers work. Retrieved from https://developer.mozilla.org/en-US/docs/Web/Performance/How_browsers_work\">[5]</a></sup> \n",
"With all the downloaded elements in place, the browser processes the HTML, the CSS style sheets, and combines it with other resources (such as downloaded fonts, photos, videos, and data downloaded from APIs) to **paint** the webpage to your screen.<sup id=\"ref10\" class=\"reference\"><a href=\"https://developer.mozilla.org/en-US/docs/Web/Performance/How_browsers_work\" title=\"Mozilla (2023). Populating the page: how browsers work. Retrieved from https://developer.mozilla.org/en-US/docs/Web/Performance/How_browsers_work\">[10]</a></sup> \n",
"</p>\n",
"<p style=\"font-size:10px\">\n",
"[5] Mozilla (2023). Populating the page: how browsers work. Retrieved from https://developer.mozilla.org/en-US/docs/Web/Performance/How_browsers_work\" <br>\n",
"[10] Mozilla (2023). Populating the page: how browsers work. Retrieved from https://developer.mozilla.org/en-US/docs/Web/Performance/How_browsers_work\" <br>\n",
"</p>"
]
},
Expand Down Expand Up @@ -592,7 +583,7 @@
"\n",
"## HTTP requests with `requests`\n",
"\n",
"If you don't already have these packages installed, start by installing them.<sup id=\"ref10\" class=\"footnote\"><a href=\"https://python-poetry.org/\" title=\"It's a best practice to use environments to control package dependencies. This project uses Poetry: https://python-poetry.org/\">[10]</a></sup> \n",
"If you don't already have these packages installed, start by installing them.<sup id=\"ref11\" class=\"footnote\"><a href=\"https://python-poetry.org/\" title=\"It's a best practice to use environments to control package dependencies. This project uses Poetry: https://python-poetry.org/\">[11]</a></sup> \n",
"\n",
"To install the packages, type the following prompt into your terminal:"
]
Expand Down Expand Up @@ -624,16 +615,6 @@
"pip install requests beautifulsoup4"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"</p>\n",
"<p style=\"font-size:10px\">\n",
"[10] It's a best practice to use environments to control package dependencies. This project uses Poetry: https://python-poetry.org/ <br>\n",
"</p>"
]
},
{
"cell_type": "markdown",
"metadata": {
Expand All @@ -655,6 +636,16 @@
"from bs4 import BeautifulSoup"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"</p>\n",
"<p style=\"font-size:10px\">\n",
"[11] It's a best practice to use environments to control package dependencies. This project uses Poetry: https://python-poetry.org/ <br>\n",
"</p>"
]
},
{
"cell_type": "markdown",
"metadata": {
Expand Down Expand Up @@ -1671,13 +1662,13 @@
"source": [
"# Sample code: `selenium`\n",
"\n",
"`selenium` is a tool in Python (and many other programming languages) that allows users to **access dynamic web content by automating web browser interactions**.<sup id=\"ref11\" class=\"footnote\"><a href=\"https://www.selenium.dev/documentation/webdriver/getting_started/\" title=\"Selenium documentation can be found here: https://www.selenium.dev/documentation/webdriver/getting_started/\">[11]</a></sup> \n",
"`selenium` is a tool in Python (and many other programming languages) that allows users to **access dynamic web content by automating web browser interactions**.<sup id=\"ref11\" class=\"footnote\"><a href=\"https://www.selenium.dev/documentation/webdriver/getting_started/\" title=\"Selenium documentation can be found here: https://www.selenium.dev/documentation/webdriver/getting_started/\">[12]</a></sup> \n",
"\n",
"It simulates a real user browsing the web, which enables it to **capture JavaScript-rendered content and other dynamic elements** that one-off HTTP requests cannot access.\n",
"\n",
"</p>\n",
"<p style=\"font-size:10px\">\n",
"[11] Selenium documentation can be found here: https://www.selenium.dev/documentation/webdriver/getting_started/ <br>\n",
"[12] Selenium documentation can be found here: https://www.selenium.dev/documentation/webdriver/getting_started/ <br>\n",
"</p> "
]
},
Expand Down Expand Up @@ -1770,7 +1761,7 @@
"source": [
"# Set up Chrome options\n",
"chrome_options = Options()\n",
"chrome_options.add_argument(\"--headless\") # Run without opening a browser window"
"chrome_options.add_argument(\"--headless\")"
]
},
{
Expand Down

0 comments on commit e5ad4d7

Please sign in to comment.