Skip to content

danelsan/tutorial-scraping-javascript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JavaScript Scraping Tutorial

Introduction

For scraping web pages that use JavaScript, we can use Selenium, a browser automation library. Selenium allows us to control a web browser through code, enabling us to navigate pages, interact with elements, and extract dynamic information generated by JavaScript.

In this tutorial, we will create a Python script that uses Selenium to extract links from a web page. Additionally, we will use Docker to run our script in an isolated environment.

Usage

Start Services and Run the Scraping Script

  1. Build the Docker image and start the services:

    make run-js
  2. Run the scraping script withoud javascript:

    make run

This will start the Nginx web server and the scraping script inside a Docker container, extracting the links from the specified web page.

Conclusion

This tutorial demonstrates how to use Selenium and Docker for scraping a web page that uses JavaScript. Selenium enables us to effectively interact with dynamic web pages, while Docker ensures that our environment is isolated and reproducible.

For more details, you can refer to the tutorial News Technology .

Happy scraping!


Let me know if you need any further clarifications or if there's anything else I can help you with! 😊

About

Simple code for scraping a web page with Selenium

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published