Skip to main content

Automate MICS survey downloading

Project description

MICSV

MICS SURVEY: automate MICS dataset download

TODO

  • Login and download
  • Refine popup deflection

Install

pip3 install micsv

Required libs

pip3 install bs4
pip3 install selenium
# and install whatever libs missing on your machine...

Run

In terminal

python3

In python

from micsv import run_mics
run_mics(versions = [], overwrite = False, save_to = ".", sleep = 5)
  • versions: a list of MICS versions to download, empty means download all from MICS2 to MICS6

  • overwrite: overwrite exising file in save_to directory

  • save_to: where to save the file, default to current working directory. Perhaps better to do

    import os
    os.chdir('path/to/where/to/save')
    run_mics()
    
  • sleep: required, sometime MICS website load too slow and needed time to solve reCaptcha.

  • This program will open a new browser window (Firefox in this case).

  • Use your username, password, pass the reCaptcha and click login (then make no more movement in the browser please).

  • The code will wait until MICS logged in successfully (5 minutes timeout) and automatically redirect to surveys site.

Example outputs

Processing page 1
Processing page 2
Processing page 3
Processing page 4
Processing page 5
Processing page 6
There are 222 file(s) detected.
The-Gambia-MICS6-Datasets.zip is already existed.
Skip downloading The-Gambia-MICS6-Datasets.zip

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

micsv-0.0.2.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

micsv-0.0.2-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file micsv-0.0.2.tar.gz.

File metadata

  • Download URL: micsv-0.0.2.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for micsv-0.0.2.tar.gz
Algorithm Hash digest
SHA256 8109d2a42ef2147df748bfb592e6bcd6e6e6cf512b5cf46e10f10ea01afa2d44
MD5 7a8595efd02ce406a778357a1370b188
BLAKE2b-256 b616d87b2ba01e65035bb3bd1ab74e131fa5035bbb85ace2579cf2cedbc8448c

See more details on using hashes here.

File details

Details for the file micsv-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: micsv-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for micsv-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2b7daafde5c6daf3d0f1b2e7f3beb7ba322f6297c67dbef0570e4081f8beca68
MD5 d1ad1475c406b72d5a459ff02a2b6f86
BLAKE2b-256 2424b1bb115f502579d316bfc2fe6f18bc5e080b8e5d040cc77f02dc40343566

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page