From bb5b8e3f0c360b41a1dbe4fd66d4f77944cfae96 Mon Sep 17 00:00:00 2001 From: Jen456 Date: Sat, 23 Aug 2025 11:09:27 -0500 Subject: [PATCH 1/2] explicando sobre pip install request --- lessons/02_web_scraping.ipynb | 89 +++++++++++++++++++++++++++++------ 1 file changed, 75 insertions(+), 14 deletions(-) diff --git a/lessons/02_web_scraping.ipynb b/lessons/02_web_scraping.ipynb index 385806a..5e3c274 100644 --- a/lessons/02_web_scraping.ipynb +++ b/lessons/02_web_scraping.ipynb @@ -46,19 +46,69 @@ ] }, { - "cell_type": "code", - "execution_count": null, + "cell_type": "markdown", "metadata": {}, - "outputs": [], "source": [ - "%pip install requests" + "### la libreria REQUEST es necesaria para hacer solicitudes HTTP y descargar páginas web, lo cual es fundamental para hacer web scraping (extraer información de páginas web)." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Note: you may need to restart the kernel to use updated packages.\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "ERROR: Invalid requirement: '#': Expected package name at the start of dependency specifier\n", + " #\n", + " ^\n" + ] + } + ], + "source": [ + "%pip install requests " + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Collecting beautifulsoup4\n", + " Downloading beautifulsoup4-4.13.4-py3-none-any.whl.metadata (3.8 kB)\n", + "Collecting soupsieve>1.2 (from beautifulsoup4)\n", + " Downloading soupsieve-2.7-py3-none-any.whl.metadata (4.6 kB)\n", + "Collecting typing-extensions>=4.0.0 (from beautifulsoup4)\n", + " Downloading typing_extensions-4.14.1-py3-none-any.whl.metadata (3.0 kB)\n", + "Downloading beautifulsoup4-4.13.4-py3-none-any.whl (187 kB)\n", + "Downloading soupsieve-2.7-py3-none-any.whl (36 kB)\n", + "Downloading typing_extensions-4.14.1-py3-none-any.whl (43 kB)\n", + "Installing collected packages: typing-extensions, soupsieve, beautifulsoup4\n", + "\n", + " ------------- -------------------------- 1/3 [soupsieve]\n", + " -------------------------- ------------- 2/3 [beautifulsoup4]\n", + " -------------------------- ------------- 2/3 [beautifulsoup4]\n", + " -------------------------- ------------- 2/3 [beautifulsoup4]\n", + " ---------------------------------------- 3/3 [beautifulsoup4]\n", + "\n", + "Successfully installed beautifulsoup4-4.13.4 soupsieve-2.7 typing-extensions-4.14.1\n", + "Note: you may need to restart the kernel to use updated packages.\n" + ] + } + ], "source": [ "%pip install beautifulsoup4" ] @@ -72,9 +122,25 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 3, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Collecting lxml\n", + " Downloading lxml-6.0.1-cp313-cp313-win_amd64.whl.metadata (3.9 kB)\n", + "Downloading lxml-6.0.1-cp313-cp313-win_amd64.whl (4.0 MB)\n", + " ---------------------------------------- 0.0/4.0 MB ? eta -:--:--\n", + " ----- ---------------------------------- 0.5/4.0 MB 5.7 MB/s eta 0:00:01\n", + " ---------------------------------------- 4.0/4.0 MB 15.9 MB/s 0:00:00\n", + "Installing collected packages: lxml\n", + "Successfully installed lxml-6.0.1\n", + "Note: you may need to restart the kernel to use updated packages.\n" + ] + } + ], "source": [ "%pip install lxml" ] @@ -988,7 +1054,7 @@ "metadata": { "anaconda-cloud": {}, "kernelspec": { - "display_name": "Python 3 (ipykernel)", + "display_name": "Python 3", "language": "python", "name": "python3" }, @@ -1002,12 +1068,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.13" - }, - "vscode": { - "interpreter": { - "hash": "b6f9fe9f4b7182690503d8ecc2bae97b0ee3ebf54e877167ae4d28c119a56988" - } + "version": "3.13.6" } }, "nbformat": 4, From e496c06da97e629511a6ab942252cbeb8fe6f70a Mon Sep 17 00:00:00 2001 From: julizzazeime456-afk Date: Sat, 23 Aug 2025 11:53:26 -0500 Subject: [PATCH 2/2] agregando la explicacion de beautifulsoup4 --- lessons/02_web_scraping.ipynb | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/lessons/02_web_scraping.ipynb b/lessons/02_web_scraping.ipynb index 5e3c274..52b3597 100644 --- a/lessons/02_web_scraping.ipynb +++ b/lessons/02_web_scraping.ipynb @@ -45,42 +45,33 @@ "We will use two main packages: [Requests](http://docs.python-requests.org/en/latest/user/quickstart/) and [Beautiful Soup](http://www.crummy.com/software/BeautifulSoup/bs4/doc/). Go ahead and install these packages, if you haven't already:" ] }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### la libreria REQUEST es necesaria para hacer solicitudes HTTP y descargar páginas web, lo cual es fundamental para hacer web scraping (extraer información de páginas web)." - ] - }, { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ + "Requirement already satisfied: requests in c:\\users\\jjala\\appdata\\local\\programs\\python\\python313\\lib\\site-packages (2.32.5)\n", + "Requirement already satisfied: charset_normalizer<4,>=2 in c:\\users\\jjala\\appdata\\local\\programs\\python\\python313\\lib\\site-packages (from requests) (3.4.3)\n", + "Requirement already satisfied: idna<4,>=2.5 in c:\\users\\jjala\\appdata\\local\\programs\\python\\python313\\lib\\site-packages (from requests) (3.10)\n", + "Requirement already satisfied: urllib3<3,>=1.21.1 in c:\\users\\jjala\\appdata\\local\\programs\\python\\python313\\lib\\site-packages (from requests) (2.5.0)\n", + "Requirement already satisfied: certifi>=2017.4.17 in c:\\users\\jjala\\appdata\\local\\programs\\python\\python313\\lib\\site-packages (from requests) (2025.8.3)\n", "Note: you may need to restart the kernel to use updated packages.\n" ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "ERROR: Invalid requirement: '#': Expected package name at the start of dependency specifier\n", - " #\n", - " ^\n" - ] } ], "source": [ + "# 🌐 La librería requests es necesaria para hacer solicitudes HTTP y descargar páginas web.\n", + "# 🕸️ Esto es fundamental para hacer web scraping (extraer información de páginas web).\n", "%pip install requests " ] }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -110,6 +101,8 @@ } ], "source": [ + "# 🥣 La instrucción %pip install beautifulsoup4 sirve para instalar la librería Beautiful Soup 4 en tu entorno de Jupyter Notebook.\n", + "# 🕸️ Beautiful Soup es esencial para analizar y extraer información de archivos HTML y XML, lo que facilita el web scraping.\n", "%pip install beautifulsoup4" ] },