codeforIATI / country-region-codes-scraper

Scraper to collect country and region information


Contributors markbrough andylolz

Last run failed with status code 1.

Console output of last run

Injecting configuration and compiling... [1G [1G-----> Python app detected [1G-----> Installing python-3.6.2 [1G-----> Installing pip [1G-----> Installing requirements with pip [1G Collecting lxml==4.6.3 [1G Downloading lxml-4.6.3-cp36-cp36m-manylinux2014_x86_64.whl (6.3 MB) [1G Collecting scraperwiki==0.5.1 [1G Downloading scraperwiki-0.5.1.tar.gz (7.7 kB) [1G Preparing metadata (setup.py): started [1G Preparing metadata (setup.py): finished with status 'done' [1G Collecting requests [1G Downloading requests-2.26.0-py2.py3-none-any.whl (62 kB) [1G Collecting six [1G Downloading six-1.16.0-py2.py3-none-any.whl (11 kB) [1G Collecting sqlalchemy [1G Downloading SQLAlchemy-1.4.26-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.6 MB) [1G Collecting alembic [1G Downloading alembic-1.7.4-py3-none-any.whl (209 kB) [1G Collecting Mako [1G Downloading Mako-1.1.5-py2.py3-none-any.whl (75 kB) [1G Collecting importlib-resources [1G Downloading importlib_resources-5.3.0-py3-none-any.whl (28 kB) [1G Collecting importlib-metadata [1G Downloading importlib_metadata-4.8.1-py3-none-any.whl (17 kB) [1G Collecting greenlet!=0.4.17 [1G Downloading greenlet-1.1.2-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (147 kB) [1G Collecting urllib3<1.27,>=1.21.1 [1G Downloading urllib3-1.26.7-py2.py3-none-any.whl (138 kB) [1G Collecting idna<4,>=2.5 [1G Downloading idna-3.3-py3-none-any.whl (61 kB) [1G Collecting certifi>=2017.4.17 [1G Downloading certifi-2021.10.8-py2.py3-none-any.whl (149 kB) [1G Collecting charset-normalizer~=2.0.0 [1G Downloading charset_normalizer-2.0.7-py3-none-any.whl (38 kB) [1G Collecting zipp>=0.5 [1G Downloading zipp-3.6.0-py3-none-any.whl (5.3 kB) [1G Collecting typing-extensions>=3.6.4 [1G Downloading typing_extensions-3.10.0.2-py3-none-any.whl (26 kB) [1G Collecting MarkupSafe>=0.9.2 [1G Downloading MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (30 kB) [1G Building wheels for collected packages: scraperwiki [1G Building wheel for scraperwiki (setup.py): started [1G Building wheel for scraperwiki (setup.py): finished with status 'done' [1G Created wheel for scraperwiki: filename=scraperwiki-0.5.1-py3-none-any.whl size=6545 sha256=fd2faabe038b06209b6982e45cc107ce67c1d3e99344c9544d33cc03ddf0ba79 [1G Stored in directory: /tmp/pip-ephem-wheel-cache-efjt211n/wheels/cd/f8/ac/cd66eb1c557ab40d35c1ed852da3e9b37baa3e21b61906a5cf [1G Successfully built scraperwiki [1G Installing collected packages: zipp, typing-extensions, MarkupSafe, importlib-metadata, greenlet, urllib3, sqlalchemy, Mako, importlib-resources, idna, charset-normalizer, certifi, six, requests, alembic, scraperwiki, lxml [1G Successfully installed Mako-1.1.5 MarkupSafe-2.0.1 alembic-1.7.4 certifi-2021.10.8 charset-normalizer-2.0.7 greenlet-1.1.2 idna-3.3 importlib-metadata-4.8.1 importlib-resources-5.3.0 lxml-4.6.3 requests-2.26.0 scraperwiki-0.5.1 six-1.16.0 sqlalchemy-1.4.26 typing-extensions-3.10.0.2 urllib3-1.26.7 zipp-3.6.0 [1G [1G [1G-----> Discovering process types [1G Procfile declares types -> scraper Injecting scraper and running... Starting up... Getting countries data... Traceback (most recent call last): File "/app/.heroku/python/lib/python3.6/site-packages/urllib3/connectionpool.py", line 706, in urlopen chunked=chunked, File "/app/.heroku/python/lib/python3.6/site-packages/urllib3/connectionpool.py", line 382, in _make_request self._validate_conn(conn) File "/app/.heroku/python/lib/python3.6/site-packages/urllib3/connectionpool.py", line 1010, in _validate_conn conn.connect() File "/app/.heroku/python/lib/python3.6/site-packages/urllib3/connection.py", line 426, in connect tls_in_tls=tls_in_tls, File "/app/.heroku/python/lib/python3.6/site-packages/urllib3/util/ssl_.py", line 450, in ssl_wrap_socket sock, context, tls_in_tls, server_hostname=server_hostname File "/app/.heroku/python/lib/python3.6/site-packages/urllib3/util/ssl_.py", line 493, in _ssl_wrap_socket_impl return ssl_context.wrap_socket(sock, server_hostname=server_hostname) File "/app/.heroku/python/lib/python3.6/ssl.py", line 401, in wrap_socket _context=self, _session=session) File "/app/.heroku/python/lib/python3.6/ssl.py", line 808, in __init__ self.do_handshake() File "/app/.heroku/python/lib/python3.6/ssl.py", line 1061, in do_handshake self._sslobj.do_handshake() File "/app/.heroku/python/lib/python3.6/ssl.py", line 683, in do_handshake self._sslobj.do_handshake() ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:748) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/app/.heroku/python/lib/python3.6/site-packages/requests/adapters.py", line 449, in send timeout=timeout File "/app/.heroku/python/lib/python3.6/site-packages/urllib3/connectionpool.py", line 756, in urlopen method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2] File "/app/.heroku/python/lib/python3.6/site-packages/urllib3/util/retry.py", line 574, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='codeforiati.org', port=443): Max retries exceeded with url: /country-codes/country_codes.csv (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:748)'),)) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "scraper.py", line 92, in <module> run() File "scraper.py", line 42, in run countries_data = get_countries_data() File "scraper.py", line 32, in get_countries_data r = requests.get(COUNTRIES_GITHUB_URL) File "/app/.heroku/python/lib/python3.6/site-packages/requests/api.py", line 75, in get return request('get', url, params=params, **kwargs) File "/app/.heroku/python/lib/python3.6/site-packages/requests/api.py", line 61, in request return session.request(method=method, url=url, **kwargs) File "/app/.heroku/python/lib/python3.6/site-packages/requests/sessions.py", line 542, in request resp = self.send(prep, **send_kwargs) File "/app/.heroku/python/lib/python3.6/site-packages/requests/sessions.py", line 655, in send r = adapter.send(request, **kwargs) File "/app/.heroku/python/lib/python3.6/site-packages/requests/adapters.py", line 514, in send raise SSLError(e, request=request) requests.exceptions.SSLError: HTTPSConnectionPool(host='codeforiati.org', port=443): Max retries exceeded with url: /country-codes/country_codes.csv (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:748)'),))

Data

Downloaded 1 time by andylolz

To download data sign in with GitHub

Download table (as CSV) Download SQLite database (184 KB) Use the API

rows 10 / 249

Global Code Global Name Region Code Region Name Sub-region Code Sub-region Name Intermediate Region Code Intermediate Region Name Country or Area M49 Code ISO-alpha2 Code ISO-alpha3 Code Least Developed Countries (LDC) Land Locked Developing Countries (LLDC) Small Island Developing States (SIDS) Developed / Developing Countries Global Name_ZH Region Name_ZH Sub-region Name_ZH Intermediate Region Name_ZH Country or Area_ZH Global Name_RU Region Name_RU Sub-region Name_RU Intermediate Region Name_RU Country or Area_RU Global Name_FR Region Name_FR Sub-region Name_FR Intermediate Region Name_FR Country or Area_FR Global Name_ES Region Name_ES Sub-region Name_ES Intermediate Region Name_ES Country or Area_ES Global Name_AR Region Name_AR Sub-region Name_AR Intermediate Region Name_AR Country or Area_AR
001
World
002
Africa
015
Northern Africa
Algeria
012
DZ
DZA
false
false
false
Developing
世界
非洲
北非
阿尔及利亚
Весь мир
Африка
Северная Африка
Алжир
Monde
Afrique
Afrique septentrionale
Algérie
Mundo
África
África septentrional
Argelia
العالم
أفريقيا
أفريقيا الشمالية
الجزائر
001
World
002
Africa
015
Northern Africa
Egypt
818
EG
EGY
false
false
false
Developing
世界
非洲
北非
埃及
Весь мир
Африка
Северная Африка
Египет
Monde
Afrique
Afrique septentrionale
Égypte
Mundo
África
África septentrional
Egipto
العالم
أفريقيا
أفريقيا الشمالية
مصر
001
World
002
Africa
015
Northern Africa
Libya
434
LY
LBY
false
false
false
Developing
世界
非洲
北非
利比亚
Весь мир
Африка
Северная Африка
Ливия
Monde
Afrique
Afrique septentrionale
Libye
Mundo
África
África septentrional
Libia
العالم
أفريقيا
أفريقيا الشمالية
ليبيا
001
World
002
Africa
015
Northern Africa
Morocco
504
MA
MAR
false
false
false
Developing
世界
非洲
北非
摩洛哥
Весь мир
Африка
Северная Африка
Марокко
Monde
Afrique
Afrique septentrionale
Maroc
Mundo
África
África septentrional
Marruecos
العالم
أفريقيا
أفريقيا الشمالية
المغرب
001
World
002
Africa
015
Northern Africa
Sudan
729
SD
SDN
true
false
false
Developing
世界
非洲
北非
苏丹
Весь мир
Африка
Северная Африка
Судан
Monde
Afrique
Afrique septentrionale
Soudan
Mundo
África
África septentrional
Sudán
العالم
أفريقيا
أفريقيا الشمالية
السودان
001
World
002
Africa
015
Northern Africa
Tunisia
788
TN
TUN
false
false
false
Developing
世界
非洲
北非
突尼斯
Весь мир
Африка
Северная Африка
Тунис
Monde
Afrique
Afrique septentrionale
Tunisie
Mundo
África
África septentrional
Túnez
العالم
أفريقيا
أفريقيا الشمالية
تونس
001
World
002
Africa
015
Northern Africa
Western Sahara
732
EH
ESH
false
false
false
Developing
世界
非洲
北非
西撒哈拉
Весь мир
Африка
Северная Африка
Западная Сахара
Monde
Afrique
Afrique septentrionale
Sahara occidental
Mundo
África
África septentrional
Sáhara Occidental
العالم
أفريقيا
أفريقيا الشمالية
الصحراء الغربية
001
World
002
Africa
202
Sub-Saharan Africa
014
Eastern Africa
British Indian Ocean Territory
086
IO
IOT
false
false
false
Developing
世界
非洲
撒哈拉以南非洲
东非
英属印度洋领土
Весь мир
Африка
Африка к югу от Сахары
Восточная Африка
Британская территория в Индийском океане
Monde
Afrique
Afrique subsaharienne
Afrique orientale
Territoire britannique de l'océan Indien
Mundo
África
África Subsahariana
África oriental
Territorio Británico del Océano Índico
العالم
أفريقيا
أفريقيا جنوب الصحراء الكبرى
شرق أفريقيا
المحيط الهندي الإقليم البريطاني في
001
World
002
Africa
202
Sub-Saharan Africa
014
Eastern Africa
Burundi
108
BI
BDI
true
true
false
Developing
世界
非洲
撒哈拉以南非洲
东非
布隆迪
Весь мир
Африка
Африка к югу от Сахары
Восточная Африка
Бурунди
Monde
Afrique
Afrique subsaharienne
Afrique orientale
Burundi
Mundo
África
África Subsahariana
África oriental
Burundi
العالم
أفريقيا
أفريقيا جنوب الصحراء الكبرى
شرق أفريقيا
بوروندي
001
World
002
Africa
202
Sub-Saharan Africa
014
Eastern Africa
Comoros
174
KM
COM
true
false
true
Developing
世界
非洲
撒哈拉以南非洲
东非
科摩罗
Весь мир
Африка
Африка к югу от Сахары
Восточная Африка
Коморские Острова
Monde
Afrique
Afrique subsaharienne
Afrique orientale
Comores
Mundo
África
África Subsahariana
África oriental
Comoras
العالم
أفريقيا
أفريقيا جنوب الصحراء الكبرى
شرق أفريقيا
جزر القمر

Statistics

Average successful run time: less than a minute

Total run time: about 4 hours

Total cpu time used: 10 minutes

Total disk space used: 236 KB

History

  • Auto ran revision bcfcb9cd and failed .
    nothing changed in the database
  • Auto ran revision bcfcb9cd and failed .
    nothing changed in the database
  • Auto ran revision bcfcb9cd and failed .
    nothing changed in the database
  • Auto ran revision bcfcb9cd and failed .
    nothing changed in the database
  • Auto ran revision bcfcb9cd and failed .
    nothing changed in the database
  • ...
  • Created on morph.io

Show complete history