Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

testdrivenio/selenium-grid-docker-swarm

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Concurrent Web Scraping with Selenium Grid and Docker Swarm

Want to learn how to build this project?

Check out the blog post.

Want to use this project?

  1. Fork/Clone

  2. Create and activate a virtual environment

  3. Install the requirements

  4. Sign up for Digital Ocean and generate an access token

  5. Add the token to your environment:

    (env)$ export DIGITAL_OCEAN_ACCESS_TOKEN=[your_token]
  6. Spin up four droplets and deploy Docker Swarm:

    (env)$ sh project/create.sh
  7. Run the scraper:

    (env)$ docker-machine env node-1
    (env)$ eval $(docker-machine env node-1)
    (env)$ NODE=$(docker service ps --format "{{.Node}}" selenium_hub)
    (env)$ for i in {1..8}; do {
             python project/script.py ${i} $(docker-machine ip $NODE) &
           };
           done
  8. Bring down the resources:

    (env)$ sh project/destroy.sh

About

web scraping in parallel with Selenium Grid and Docker

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
Morty Proxy This is a proxified and sanitized view of the page, visit original site.