import whitehouse import sys import json x = 0 while True: #downloads spefic petition petitionSummeries = {} f = open('petitions.tsv') lines = f.readlines() l = lines[sys.argv[1]] print l print x x = x + 1 l = l.split('\t') petitionSummeries = whitehouse.proccessPetition(l[0], l[1], petitionSummeries, True, True)
import whitehouse #iterates over all petition urls in petitions.cvs petitionSummeries = {} f = open('petitions.tsv') lines = f.readlines() for l in lines: l = l.split('\t') petitionSummeries = whitehouse.proccessPetition(l[0], l[1], petitionSummeries) json.dump(petitionSummeries, open('webpage\\data\\petitionSummeries.json', 'wb'))
import whitehouse #iterates over all petition urls in petitions.cvs petitionSummeries = {} f = open('new.tsv') lines = f.readlines() for l in lines: l = l.split('\t') whitehouse.proccessPetition(l[0], l[1])
import whitehouse import sys import json #iterates over all petition urls in petitions.cvs petitionSummeries = {} f = open('petitions.tsv') lines = f.readlines() for l in lines: l = l.split('\t') petitionSummeries = whitehouse.proccessPetition(l[0], l[1], petitionSummeries, False, False) json.dump(petitionSummeries, open('webpage\\data\\petitionSummeries.json', 'wb'))