Skip to content

Instantly share code, notes, and snippets.

@gugek
Last active November 9, 2015 18:43
Show Gist options
  • Select an option

  • Save gugek/a00f9cc430df0e4e4e61 to your computer and use it in GitHub Desktop.

Select an option

Save gugek/a00f9cc430df0e4e4e61 to your computer and use it in GitHub Desktop.
Run rysnc commands on GovTrack.us to download bill data
"""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)
@gugek
Copy link
Author

gugek commented Nov 9, 2015

Updated so not having nested congress directories

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment