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)
Exemplo n.º 2
0
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'))
Exemplo n.º 3
0
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])
Exemplo n.º 4
0
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])
Exemplo n.º 5
0
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'))