-
Notifications
You must be signed in to change notification settings - Fork 0
/
scrape.py
60 lines (58 loc) · 1.29 KB
/
scrape.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import json
from pprint import pprint
from scraper import Scraper
countries = {
"Angola": "ao",
"Benin": "bj",
"Botswana": "bw",
"Burkina Faso": "bf",
"Burundi": "bi",
"Cameroon": "cm",
"Cape Verde": "cv",
"Central African Republic": "cf",
"Chad": "td",
"Comoros": "km",
"Congo": "cg",
"Congo, the Democratic Republic of the": "cd",
"Cote D'ivoire": "ci",
"Djibouti": "dj",
"Equatorial Guinea": "gq",
"Eritrea": "er",
"Ethiopia": "et",
"Gabon": "ga",
"Ghana": "gh",
"Guinea": "gn",
"Guinea-Bissau": "gw",
"Kenya": "ke",
"Lesotho": "ls",
"Liberia": "lr",
"Madagascar": "mg",
"Malawi": "mw",
"Mali": "ml",
"Mauritania": "mr",
"Mauritius": "mu",
"Mozambique": "mz",
"Namibia": "na",
"Niger": "ne",
"Nigeria": "ng",
"Rwanda": "rw",
"Sao Tome and Principe": "st",
"Senegal": "sn",
"Seychelles": "sc",
"Sierra Leone": "sl",
"Somalia": "so",
"South Africa": "za",
"Sudan": "sd",
"Swaziland": "sz",
"Togo": "tg",
"Uganda": "ug",
"Western Sahara": "eh",
"Zambia": "zm",
"Zimbabwe": "zw"
}
for country in countries:
try:
scraper = Scraper(country)
scraper.run_scraper()
except Exception:
print(Exception)