- Python 3.x
- Jupyter Notebook
- Required Python packages listed in
requirements.txt
-
Clone the repository:
git clone <repository-url> cd <repository-directory>
-
Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate -
Install the required packages:
pip install -r requirements.txt
-
Start Jupyter Notebook:
jupyter notebook
-
Open the desired notebook from the Jupyter interface:
- For BeautifulSoup examples, navigate to the
BeautifulSoupdirectory and openbs_example_X.ipynb. - For Selenium examples, navigate to the
Seleniumdirectory and openselenium_example_X.ipynb.
- For BeautifulSoup examples, navigate to the
-
Run the cells in the notebook to execute the code.
bs_example_1.ipynb: Parses a local HTML string and extracts elements using BeautifulSoup.bs_example_2.ipynb: Fetches a webpage usingrequestsand parses it with BeautifulSoup.
selenium_example_1.ipynb: Showing how to run a simple Selenium script.selenium_example_2.ipynb: How to use Selenium to interact with a webpage and scrape data.selenium_example_3.ipynb: How to handle a page with infinite scrolling.selenium_example_4.ipynb: Using Selenium to capture requests and responses.
This project is licensed under the MIT License.