| | 18 | == Usage == |
| | 19 | |
| | 20 | {{{ |
| | 21 | usage: wikidownloader.py [-h] [--cache CACHE] [--wait WAIT] [--newest] |
| | 22 | [--links LINKS] |
| | 23 | langcode |
| | 24 | |
| | 25 | Wikipedia downloader |
| | 26 | |
| | 27 | positional arguments: |
| | 28 | langcode Wikipedia language prefix |
| | 29 | |
| | 30 | optional arguments: |
| | 31 | -h, --help show this help message and exit |
| | 32 | --cache CACHE Directory with previously downloaded pages and data |
| | 33 | --wait WAIT Time interval between GET requests |
| | 34 | --newest Download the newest versions of articles (do not use cache) |
| | 35 | --links LINKS Gather external links from Wikipedia (Reference section) |
| | 36 | }}} |
| | 37 | |
| | 38 | == Example == |
| | 39 | |
| | 40 | Let us say you want to download fr.wikipedia.org. You can use this command: |
| | 41 | {{{ |
| | 42 | python wikidownloader.py be --wait 7 --links bewiki.links > bewiki.prevert |
| | 43 | }}} |
| | 44 | |
| | 45 | The ```.prevert``` file can be used to feed a pipeline for following processing of the data. |