File tree Expand file tree Collapse file tree 4 files changed +18
-16
lines changed Expand file tree Collapse file tree 4 files changed +18
-16
lines changed Original file line number Diff line number Diff line change 1
1
MIT License
2
2
3
- Copyright (c) 2018 Michael Herman
3
+ Copyright (c) 2019 Michael Herman
4
4
5
5
Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
of this software and associated documentation files (the "Software"), to deal
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ Check out the [blog post](https://testdriven.io/concurrent-web-scraping-with-sel
8
8
9
9
1 . Fork/Clone
10
10
11
- 1 . Create and activate a virtualenv
11
+ 1 . Create and activate a virtual environment
12
12
13
13
1 . Install the requirements
14
14
@@ -17,27 +17,29 @@ Check out the [blog post](https://testdriven.io/concurrent-web-scraping-with-sel
17
17
1 . Add the token to your environment:
18
18
19
19
``` sh
20
- $ export DIGITAL_OCEAN_ACCESS_TOKEN=[your_token]
20
+ (env) $ export DIGITAL_OCEAN_ACCESS_TOKEN=[your_token]
21
21
```
22
22
23
23
1. Spin up four droplets and deploy Docker Swarm:
24
24
25
25
` ` ` sh
26
- $ sh project/create.sh
26
+ (env) $ sh project/create.sh
27
27
` ` `
28
28
29
29
1. Run the scraper:
30
30
31
31
` ` ` sh
32
- $ NODE=$( docker service ps --format " {{.Node}}" selenium_hub)
33
- $ for i in {1..8}; do {
34
- python project/script.py ${i} $( docker-machine ip $NODE ) &
35
- };
36
- done
32
+ (env)$ docker-machine env node-1
33
+ (env)$ eval $( docker-machine env node-1)
34
+ (env)$ NODE=$( docker service ps --format " {{.Node}}" selenium_hub)
35
+ (env)$ for i in {1..8}; do {
36
+ python project/script.py ${i} $( docker-machine ip $NODE ) &
37
+ };
38
+ done
37
39
` ` `
38
40
39
41
1. Bring down the resources:
40
42
41
43
` ` ` sh
42
- $ sh project/destroy.sh
44
+ (env) $ sh project/destroy.sh
43
45
` ` `
Original file line number Diff line number Diff line change 1
- version : ' 3.5 '
1
+ version : ' 3.7 '
2
2
3
3
services :
4
4
5
5
hub :
6
- image : selenium/hub:3.9.1
6
+ image : selenium/hub:3.141.59
7
7
ports :
8
8
- 4444:4444
9
9
deploy :
@@ -14,7 +14,7 @@ services:
14
14
- node.role == worker
15
15
16
16
chrome :
17
- image : selenium/node-chrome:3.9.1
17
+ image : selenium/node-chrome:3.141.59
18
18
volumes :
19
19
- /dev/urandom:/dev/random
20
20
depends_on :
Original file line number Diff line number Diff line change 1
- beautifulsoup4 == 4.6.0
2
- requests == 2.18.4
3
- selenium == 3.8.1
1
+ beautifulsoup4 == 4.7.1
2
+ requests == 2.21.0
3
+ selenium == 3.141.0
You can’t perform that action at this time.
0 commit comments