Last active
November 9, 2015 18:43
-
-
Save gugek/a00f9cc430df0e4e4e61 to your computer and use it in GitHub Desktop.
Run rysnc commands on GovTrack.us to download bill data
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """Run rysnc commands on GovTrack.us to download bill data""" | |
| try: | |
| import subprocess32 as subprocess | |
| except: | |
| import subprocess | |
| import os | |
| congresses = range(103, 114) | |
| for congress in congresses: | |
| command = ['rsync', '-azr', '--progress', '--delete', '--delete-excluded'] | |
| remote_folder = 'govtrack.us::govtrackdata/congress/{0}'.format(congress) | |
| local_folder = 'congress' | |
| command.append(remote_folder) | |
| command.append(local_folder) | |
| subprocess.call(command) |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Updated so not having nested congress directories