ersinaksar / Dockerized-Firefox-for-Web-Scraping

A repository containing a Dockerfile and sample Python code to run Firefox in a Docker container for web scraping.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dockerized Firefox for Web Scraping

Read this in other languages: English, Turkish.

A repository containing a Dockerfile and sample Python code to run Firefox in a Docker container for web scraping.

This is a Dockerized Python script that uses Selenium and Firefox to scrape the page source of a given URL. The script is run in headless mode using Xvfb.

🧐 Features

Here're some of the project's best features:

  • Scrapes the page source of a given URL using Firefox and Selenium.
  • Runs in headless mode using Xvfb.

🛠️ Installation Steps:

1. Install Docker on your system.

2. Clone the repository.

3. Build the Docker image using the command

sudo docker build -t my-firefox .

4. Run the Docker container using the command

sudo docker run --rm -e DISPLAY=:99 my-firefox

5. The page source of the URL will be printed to the console.

🍰 Contribution Guidelines:

Contributions to the project are welcome. If you find a bug or have a suggestion for a new feature please open an issue or a pull request.

💻 Built with

Technologies used in the project:

  • Python
  • Docker
  • Selenium
  • Firefox
  • Xvfb

💖Like my work?

If you have any questions or need help with the project please feel free to open an issue on GitHub.

About

A repository containing a Dockerfile and sample Python code to run Firefox in a Docker container for web scraping.


Languages

Language:Python 64.8%Language:Dockerfile 35.2%