def load(): legs= leg.load() for x in sorted(legs['wp'].keys()): idsobj= legs['wp'][x]['id'] name = legs['wp'][x]['name']['official_full'] congid = idsobj['govtrack'] wiki= idsobj['opencongwiki'] if (not wiki == "Error" ): continue xml = cache.cacheweb('http://api.opencongress.org/people?person_id=%d' % congid) xml =xml.replace("<?xml version=\"1.0\" encoding=\"UTF-8\"?>","") xmlio = StringIO(xml) tree = etree.parse(xmlio) name = unicode(tree.xpath("//unaccented-name/text()")[0]) name = name.replace(" ","_") url = "http://www.opencongress.org/w/index.php?title=%s&printable=yes" % name #url = "http://www.opencongress.org/wiki/%s" % name try : data = cache.cacheweb( url) except Exception, e: print "failed", name ,e except KeyboardInterrupt: print "bye" exit()
def extract_links(f_name_link): print "extract_links", f_name_link contents = "" try: contents = cache.cacheweb(f_name_link) except: # try once agains contents = cache.cacheweb(f_name_link) return xlinks(contents)
def process(fecid, verbose): # url = "http://images.nictusa.com/cgi-bin/fecimg/?" + fecid data = cache.cacheweb(url) d = lxml.html.document_fromstring(data) d.make_links_absolute(url) for (f_name_element, attr, f_link, pos) in d.iterlinks(): if (attr == 'href'): print f_link data = cache.cacheweb(f_link)
def process(fecid, verbose): # url = "http://images.nictusa.com/cgi-bin/fecimg/?" + fecid data = cache.cacheweb(url) d = lxml.html.document_fromstring(data) d.make_links_absolute(url) for (f_name_element, attr, f_link, pos) in d.iterlinks(): if attr == "href": print f_link data = cache.cacheweb(f_link)
def load(): legs= leg.load() for x in sorted(legs['wp'].keys()): idsobj= legs['wp'][x]['id'] if 'govtrack' in idsobj: congid = idsobj['govtrack'] cache.cacheweb('http://api.opencongress.org/people?person_id=%d' % congid) htmlstr = cache.cacheweb('http://www.opencongress.org/people/show/%d' % congid) parse(htmlstr,idsobj) dump.dump(legs)
def load(): legs = leg.load() for x in sorted(legs['wp'].keys()): idsobj = legs['wp'][x]['id'] if 'govtrack' in idsobj: congid = idsobj['govtrack'] cache.cacheweb('http://api.opencongress.org/people?person_id=%d' % congid) htmlstr = cache.cacheweb( 'http://www.opencongress.org/people/show/%d' % congid) parse(htmlstr, idsobj) dump.dump(legs)
def load(): legs = leg.load() out = open("report.wiki", 'w') for x in sorted(legs['wp'].keys()): idsobj = legs['wp'][x]['id'] gt = idsobj['govtrack'] oname = idsobj['opencongwiki'] name = unicode(oname) name = name.encode('utf-8') name = urllib.quote_plus(name) url = "http://www.opencongress.org/w/index.php?title=%s&printable=yes" % name try: data = cache.cacheweb(url) except urllib2.HTTPError, e: if (e.code == 404): p = 'http://www.opencongress.org/people/show/%d' % gt # print u"* Missing [[" , unicode(oname) , u"]] from [", unicode(p), u" ", unicode(oname) , u"]" s = u"* Missing [[{}]] from [{} {}]\n".format( unicode(oname), p, unicode(oname)) print s out.write(s.encode('utf-8')) idsobj['opencongwiki'] = "Error" except Exception, e: # print "Missing [[",name,"]]" print "failed", name, e idsobj['opencongwiki'] = "Error2"
def load(): legs= leg.load() out = open("report.wiki", 'w') for x in sorted(legs['wp'].keys()): idsobj= legs['wp'][x]['id'] gt = idsobj['govtrack'] oname = idsobj['opencongwiki'] name = unicode(oname) name = name.encode('utf-8') name= urllib.quote_plus(name) url = "http://www.opencongress.org/w/index.php?title=%s&printable=yes" % name try : data = cache.cacheweb( url) except urllib2.HTTPError, e: if ( e.code == 404) : p='http://www.opencongress.org/people/show/%d' % gt # print u"* Missing [[" , unicode(oname) , u"]] from [", unicode(p), u" ", unicode(oname) , u"]" s=u"* Missing [[{}]] from [{} {}]\n".format(unicode(oname),p,unicode(oname)) print s out.write(s.encode('utf-8')) idsobj['opencongwiki']="Error" except Exception, e: # print "Missing [[",name,"]]" print "failed", name ,e idsobj['opencongwiki']="Error2"
def expenses(): u""" get the xml for expenses """ u''' ''' url = FECDATAURL + '/IndependentExpenditure.do?format=xml' return cache.cacheweb(url)
def index(contacts,n,term,field_list): global seen main = cache.cacheweb (term['url']) for f in field_list : if f in term : url= term[f] else: newdata = "" print f, " missing in ",n, term if f == 'contact_form': newdata=scan_contact(main,term['url']) if f == 'rss_url': newdata=scan_rss(main,term['url']) if newdata is not None: newdata=newdata.replace("&","&") term[f]=newdata return term
def index(contacts, n, term, field_list): global seen main = cache.cacheweb(term['url']) for f in field_list: if f in term: url = term[f] else: newdata = "" print f, " missing in ", n, term if f == 'contact_form': newdata = scan_contact(main, term['url']) if f == 'rss_url': newdata = scan_rss(main, term['url']) if newdata is not None: newdata = newdata.replace("&", "&") term[f] = newdata return term
def committee_summary(): u''' ''' url = FECDATAURL + '/CommitteeSummary.do?format=xml' return cache.cacheweb(url)
def get(url, name): u""" just call the fetch routine """ print "getting name %s with url %s" % (name, url) return cache.cacheweb(url)
import cache cache.cacheweb( 'http://data.maplight.org/FEC/2014/records/c3/zip') #FEC2012c3.zip cache.cacheweb( 'http://data.maplight.org/FEC/2014/records/c2/zip') #FEC2012c2.zip cache.cacheweb( 'http://data.maplight.org/FEC/2014/records/c1/zip') #FEC2012c1.zip
import cache cache.cacheweb('http://data.maplight.org/FEC/2014/records/c3/zip') #FEC2012c3.zip cache.cacheweb('http://data.maplight.org/FEC/2014/records/c2/zip') #FEC2012c2.zip cache.cacheweb('http://data.maplight.org/FEC/2014/records/c1/zip') #FEC2012c1.zip
def candidate_summary(): u''' ''' url = FECDATAURL + '/CandidateSummary.do?format=xml' return cache.cacheweb(url)
def campaign_and_committee_summary(): u''' ''' url = FECDATAURL + '/CampaignAndCommitteeSummary.do?format=xml' return cache.cacheweb(url)
def all_candidate_disbursement(): u''' ''' data = {} for filename in ['AK_01.xml', 'AK_all_house_senate.xml', 'AK_all_house.xml', 'AK_all_senate.xml', 'AK_S0AK00097.xml', 'AK_S0AK00121.xml', 'AK_S0AK00139.xml', 'AK_S4AK00099.xml', 'AL_01.xml', 'AL_02.xml', 'AL_03.xml', 'AL_04.xml', 'AL_05.xml', 'AL_06.xml', 'AL_07.xml', 'AL_all_house_senate.xml', 'AL_all_house.xml', 'AL_all_senate.xml', 'all_house_senate.xml', 'all_house.xml', 'all_senate.xml', 'AL_S0AL00164.xml', 'AL_S6AL00013.xml', 'AR_01.xml', 'AR_02.xml', 'AR_03.xml', 'AR_04.xml', 'AR_all_house_senate.xml', 'AR_all_house.xml', 'AR_all_senate.xml', 'AR_S0AR00036.xml', 'AR_S0AR00044.xml', 'AR_S0AR00051.xml', 'AR_S0AR00069.xml', 'AR_S0AR00077.xml', 'AR_S0AR00085.xml', 'AR_S0AR00093.xml', 'AR_S0AR00127.xml', 'AR_S0AR00135.xml', 'AR_S0AR00143.xml', 'AR_S0AR00150.xml', 'AR_S0AR00168.xml', 'AR_S0AR00176.xml', 'AR_S0AR00184.xml', 'AR_S4AR00046.xml', 'AR_S8AR00112.xml', 'AS_01.xml', 'AS_all_house_senate.xml', 'AS_all_house.xml', 'AS_all_senate.xml', 'AZ_01.xml', 'AZ_02.xml', 'AZ_03.xml', 'AZ_04.xml', 'AZ_05.xml', 'AZ_06.xml', 'AZ_07.xml', 'AZ_08.xml', 'AZ_all_house_senate.xml', 'AZ_all_house.xml', 'AZ_all_senate.xml', 'AZ_S0AZ00186.xml', 'AZ_S0AZ00194.xml', 'AZ_S0AZ00202.xml', 'AZ_S0AZ00244.xml', 'AZ_S0AZ00251.xml', 'AZ_S0AZ00269.xml', 'AZ_S0AZ00277.xml', 'AZ_S0AZ00285.xml', 'AZ_S0AZ00293.xml', 'AZ_S0AZ00301.xml', 'AZ_S0AZ00319.xml', 'AZ_S4AZ00055.xml', 'AZ_S6AZ00019.xml', 'CA_01.xml', 'CA_02.xml', 'CA_03.xml', 'CA_04.xml', 'CA_05.xml', 'CA_06.xml', 'CA_07.xml', 'CA_08.xml', 'CA_09.xml', 'CA_10.xml', 'CA_11.xml', 'CA_12.xml', 'CA_13.xml', 'CA_14.xml', 'CA_15.xml', 'CA_16.xml', 'CA_17.xml', 'CA_18.xml', 'CA_19.xml', 'CA_20.xml', 'CA_21.xml', 'CA_22.xml', 'CA_23.xml', 'CA_24.xml', 'CA_25.xml', 'CA_26.xml', 'CA_27.xml', 'CA_28.xml', 'CA_29.xml', 'CA_30.xml', 'CA_31.xml', 'CA_32.xml', 'CA_33.xml', 'CA_34.xml', 'CA_35.xml', 'CA_36.xml', 'CA_37.xml', 'CA_38.xml', 'CA_39.xml', 'CA_40.xml', 'CA_41.xml', 'CA_42.xml', 'CA_43.xml', 'CA_44.xml', 'CA_45.xml', 'CA_46.xml', 'CA_47.xml', 'CA_48.xml', 'CA_49.xml', 'CA_50.xml', 'CA_51.xml', 'CA_52.xml', 'CA_53.xml', 'CA_all_house_senate.xml', 'CA_all_house.xml', 'CA_all_senate.xml', 'CA_S0CA00298.xml', 'CA_S0CA00306.xml', 'CA_S0CA00330.xml', 'CA_S0CA00363.xml', 'CA_S2CA00286.xml', 'CA_S2CA00351.xml', 'CO_01.xml', 'CO_02.xml', 'CO_03.xml', 'CO_04.xml', 'CO_05.xml', 'CO_06.xml', 'CO_07.xml', 'CO_all_house_senate.xml', 'CO_all_house.xml', 'CO_all_senate.xml', 'CO_S0CO00211.xml', 'CO_S0CO00237.xml', 'CO_S0CO00245.xml', 'CO_S0CO00260.xml', 'CO_S0CO00278.xml', 'CO_S0CO00286.xml', 'CO_S0CO00294.xml', 'CO_S0CO00302.xml', 'CO_S0CO00310.xml', 'CO_S0CO00328.xml', 'CO_S0CO00344.xml', 'CT_01.xml', 'CT_02.xml', 'CT_03.xml', 'CT_04.xml', 'CT_05.xml', 'CT_all_house_senate.xml', 'CT_all_house.xml', 'CT_all_senate.xml', 'CT_S0CT00094.xml', 'CT_S0CT00102.xml', 'CT_S0CT00110.xml', 'CT_S0CT00128.xml', 'CT_S0CT00136.xml', 'CT_S0CT00144.xml', 'CT_S0CT00151.xml', 'CT_S0CT00169.xml', 'CT_S0CT00177.xml', 'CT_S0CT00193.xml', 'CT_S0CT00219.xml', 'DC_01.xml', 'DC_all_house_senate.xml', 'DC_all_house.xml', 'DC_all_senate.xml', 'DE_01.xml', 'DE_all_house_senate.xml', 'DE_all_house.xml', 'DE_all_senate.xml', 'DE_S0DE00068.xml', 'DE_S0DE00076.xml', 'DE_S0DE00092.xml', 'DE_S0DE00118.xml', 'DE_S6DE00131.xml', 'FL_01.xml', 'FL_02.xml', 'FL_03.xml', 'FL_04.xml', 'FL_05.xml', 'FL_06.xml', 'FL_07.xml', 'FL_08.xml', 'FL_09.xml', 'FL_10.xml', 'FL_11.xml', 'FL_12.xml', 'FL_13.xml', 'FL_14.xml', 'FL_15.xml', 'FL_16.xml', 'FL_17.xml', 'FL_18.xml', 'FL_19.xml', 'FL_20.xml', 'FL_21.xml', 'FL_22.xml', 'FL_23.xml', 'FL_24.xml', 'FL_25.xml', 'FL_all_house_senate.xml', 'FL_all_house.xml', 'FL_all_senate.xml', 'FL_S0FL00312.xml', 'FL_S0FL00320.xml', 'FL_S0FL00338.xml', 'FL_S0FL00346.xml', 'FL_S0FL00353.xml', 'FL_S0FL00361.xml', 'FL_S0FL00395.xml', 'FL_S0FL00403.xml', 'FL_S0FL00411.xml', 'FL_S0FL00429.xml', 'FL_S0FL00437.xml', 'FL_S0FL00460.xml', 'FL_S0FL00478.xml', 'FL_S0FL00486.xml', 'FL_S0FL00502.xml', 'FL_S4FL00181.xml', 'FL_S4FL00306.xml', 'FL_S6FL00160.xml', 'GA_01.xml', 'GA_02.xml', 'GA_03.xml', 'GA_04.xml', 'GA_05.xml', 'GA_06.xml', 'GA_07.xml', 'GA_08.xml', 'GA_09.xml', 'GA_10.xml', 'GA_11.xml', 'GA_12.xml', 'GA_13.xml', 'GA_all_house_senate.xml', 'GA_all_house.xml', 'GA_all_senate.xml', 'GA_S0GA00302.xml', 'GA_S0GA00310.xml', 'GA_S0GA00328.xml', 'GA_S6GA00119.xml', 'GU_01.xml', 'GU_all_house_senate.xml', 'GU_all_house.xml', 'GU_all_senate.xml', 'HI_01.xml', 'HI_02.xml', 'HI_all_house_senate.xml', 'HI_all_house.xml', 'HI_all_senate.xml', 'HI_S4HI00011.xml', 'HI_S4HI00102.xml', 'IA_01.xml', 'IA_02.xml', 'IA_03.xml', 'IA_04.xml', 'IA_05.xml', 'IA_all_house_senate.xml', 'IA_all_house.xml', 'IA_all_senate.xml', 'IA_S0IA00028.xml', 'IA_S0IA00101.xml', 'IA_S0IA00119.xml', 'IA_S0IA00127.xml', 'ID_01.xml', 'ID_02.xml', 'ID_all_house_senate.xml', 'ID_all_house.xml', 'ID_all_senate.xml', 'ID_S0ID00107.xml', 'ID_S8ID00027.xml', 'IL_01.xml', 'IL_02.xml', 'IL_03.xml', 'IL_04.xml', 'IL_05.xml', 'IL_06.xml', 'IL_07.xml', 'IL_08.xml', 'IL_09.xml', 'IL_10.xml', 'IL_11.xml', 'IL_12.xml', 'IL_13.xml', 'IL_14.xml', 'IL_15.xml', 'IL_16.xml', 'IL_17.xml', 'IL_18.xml', 'IL_19.xml', 'IL_all_house_senate.xml', 'IL_all_house.xml', 'IL_all_senate.xml', 'IL_S0IL00196.xml', 'IL_S0IL00204.xml', 'IL_S0IL00220.xml', 'IL_S0IL00238.xml', 'IL_S0IL00246.xml', 'IL_S0IL00253.xml', 'IL_S0IL00261.xml', 'IL_S0IL00279.xml', 'IL_S0IL00287.xml', 'IL_S0IL00295.xml', 'IL_S0IL00303.xml', 'IL_S0IL00311.xml', 'IL_S0IL00329.xml', 'IL_S0IL00337.xml', 'IL_S0IL00352.xml', 'IL_S0IL00378.xml', 'IL_S6IL00185.xml', 'IN_01.xml', 'IN_02.xml', 'IN_03.xml', 'IN_04.xml', 'IN_05.xml', 'IN_06.xml', 'IN_07.xml', 'IN_08.xml', 'IN_09.xml', 'IN_all_house_senate.xml', 'IN_all_house.xml', 'IN_all_senate.xml', 'IN_S0IN00053.xml', 'IN_S0IN00095.xml', 'IN_S0IN00103.xml', 'IN_S0IN00111.xml', 'IN_S0IN00137.xml', 'IN_S0IN00152.xml', 'IN_S0IN00186.xml', 'IN_S8IN00080.xml', 'KS_01.xml', 'KS_02.xml', 'KS_03.xml', 'KS_04.xml', 'KS_all_house_senate.xml', 'KS_all_house.xml', 'KS_all_senate.xml', 'KS_S0KS00091.xml', 'KS_S0KS00109.xml', 'KS_S0KS00125.xml', 'KS_S0KS00141.xml', 'KS_S0KS00158.xml', 'KY_01.xml', 'KY_02.xml', 'KY_03.xml', 'KY_04.xml', 'KY_05.xml', 'KY_06.xml', 'KY_all_house_senate.xml', 'KY_all_house.xml', 'KY_all_senate.xml', 'KY_S0KY00115.xml', 'KY_S0KY00123.xml', 'KY_S0KY00131.xml', 'KY_S0KY00149.xml', 'KY_S0KY00156.xml', 'KY_S0KY00164.xml', 'KY_S0KY00172.xml', 'KY_S0KY00198.xml', 'KY_S0KY00206.xml', 'KY_S4KY00059.xml', 'LA_01.xml', 'LA_02.xml', 'LA_03.xml', 'LA_04.xml', 'LA_05.xml', 'LA_06.xml', 'LA_07.xml', 'LA_all_house_senate.xml', 'LA_all_house.xml', 'LA_all_senate.xml', 'LA_S0LA00154.xml', 'LA_S0LA00170.xml', 'LA_S0LA00196.xml', 'LA_S0LA00238.xml', 'LA_S0LA00279.xml', 'LA_S4LA00040.xml', 'LA_S4LA00057.xml', 'MA_01.xml', 'MA_02.xml', 'MA_03.xml', 'MA_04.xml', 'MA_05.xml', 'MA_06.xml', 'MA_07.xml', 'MA_08.xml', 'MA_09.xml', 'MA_10.xml', 'MA_all_house_senate.xml', 'MA_all_house.xml', 'MA_all_senate.xml', 'MA_S0MA00042.xml', 'MA_S0MA00075.xml', 'MA_S0MA00083.xml', 'MA_S0MA00091.xml', 'MA_S0MA00109.xml', 'MA_S0MA00117.xml', 'MA_S0MA00125.xml', 'MA_S0MA00133.xml', 'MA_S0MA00141.xml', 'MD_01.xml', 'MD_02.xml', 'MD_03.xml', 'MD_04.xml', 'MD_05.xml', 'MD_06.xml', 'MD_07.xml', 'MD_08.xml', 'MD_all_house_senate.xml', 'MD_all_house.xml', 'MD_all_senate.xml', 'MD_S0MD00242.xml', 'MD_S0MD00259.xml', 'MD_S0MD00275.xml', 'MD_S0MD00283.xml', 'MD_S0MD00291.xml', 'MD_S0MD00309.xml', 'MD_S0MD00358.xml', 'MD_S6MD00140.xml', 'ME_01.xml', 'ME_02.xml', 'ME_all_house_senate.xml', 'ME_all_house.xml', 'ME_all_senate.xml', 'MI_01.xml', 'MI_02.xml', 'MI_03.xml', 'MI_04.xml', 'MI_05.xml', 'MI_06.xml', 'MI_07.xml', 'MI_08.xml', 'MI_09.xml', 'MI_10.xml', 'MI_11.xml', 'MI_12.xml', 'MI_13.xml', 'MI_14.xml', 'MI_15.xml', 'MI_all_house_senate.xml', 'MI_all_house.xml', 'MI_all_senate.xml', 'MN_01.xml', 'MN_02.xml', 'MN_03.xml', 'MN_04.xml', 'MN_05.xml', 'MN_06.xml', 'MN_07.xml', 'MN_08.xml', 'MN_all_house_senate.xml', 'MN_all_house.xml', 'MN_all_senate.xml', 'MO_01.xml', 'MO_02.xml', 'MO_03.xml', 'MO_04.xml', 'MO_05.xml', 'MO_06.xml', 'MO_07.xml', 'MO_08.xml', 'MO_09.xml', 'MO_all_house_senate.xml', 'MO_all_house.xml', 'MO_all_senate.xml', 'MO_S0MO00183.xml', 'MO_S0MO00191.xml', 'MO_S0MO00209.xml', 'MO_S0MO00217.xml', 'MO_S0MO00225.xml', 'MO_S0MO00233.xml', 'MO_S0MO00266.xml', 'MO_S6MO00297.xml', 'MP_01.xml', 'MP_all_house_senate.xml', 'MP_all_house.xml', 'MP_all_senate.xml', 'MS_01.xml', 'MS_02.xml', 'MS_03.xml', 'MS_04.xml', 'MS_all_house_senate.xml', 'MS_all_house.xml', 'MS_all_senate.xml', 'MT_01.xml', 'MT_all_house_senate.xml', 'MT_all_house.xml', 'MT_all_senate.xml', 'NC_01.xml', 'NC_02.xml', 'NC_03.xml', 'NC_04.xml', 'NC_05.xml', 'NC_06.xml', 'NC_07.xml', 'NC_08.xml', 'NC_09.xml', 'NC_10.xml', 'NC_11.xml', 'NC_12.xml', 'NC_13.xml', 'NC_all_house_senate.xml', 'NC_all_house.xml', 'NC_all_senate.xml', 'NC_S0NC00152.xml', 'NC_S0NC00160.xml', 'NC_S0NC00178.xml', 'NC_S0NC00186.xml', 'NC_S0NC00194.xml', 'NC_S0NC00202.xml', 'NC_S0NC00210.xml', 'NC_S2NC00075.xml', 'NC_S4NC00089.xml', 'NC_S8NC00270.xml', 'ND_01.xml', 'ND_all_house_senate.xml', 'ND_all_house.xml', 'ND_all_senate.xml', 'ND_S0ND00069.xml', 'ND_S0ND00085.xml', 'ND_S0ND00093.xml', 'ND_S0ND00101.xml', 'NE_01.xml', 'NE_02.xml', 'NE_03.xml', 'NE_all_house_senate.xml', 'NE_all_house.xml', 'NE_all_senate.xml', 'NH_01.xml', 'NH_02.xml', 'NH_all_house_senate.xml', 'NH_all_house.xml', 'NH_all_senate.xml', 'NH_S0NH00227.xml', 'NH_S0NH00235.xml', 'NH_S0NH00243.xml', 'NH_S0NH00250.xml', 'NH_S0NH00268.xml', 'NH_S0NH00276.xml', 'NJ_01.xml', 'NJ_02.xml', 'NJ_03.xml', 'NJ_04.xml', 'NJ_05.xml', 'NJ_06.xml', 'NJ_07.xml', 'NJ_08.xml', 'NJ_09.xml', 'NJ_10.xml', 'NJ_11.xml', 'NJ_12.xml', 'NJ_13.xml', 'NJ_all_house_senate.xml', 'NJ_all_house.xml', 'NJ_all_senate.xml', 'NM_01.xml', 'NM_02.xml', 'NM_03.xml', 'NM_all_house_senate.xml', 'NM_all_house.xml', 'NM_all_senate.xml', 'NV_01.xml', 'NV_02.xml', 'NV_03.xml', 'NV_all_house_senate.xml', 'NV_all_house.xml', 'NV_all_senate.xml', 'NV_S0NV00138.xml', 'NV_S0NV00146.xml', 'NV_S0NV00153.xml', 'NV_S0NV00161.xml', 'NV_S0NV00179.xml', 'NV_S0NV00187.xml', 'NV_S0NV00203.xml', 'NV_S0NV00229.xml', 'NV_S0NV00237.xml', 'NV_S0NV00252.xml', 'NV_S0NV00260.xml', 'NV_S0NV00278.xml', 'NV_S0NV00351.xml', 'NV_S6NV00028.xml', 'NY_01.xml', 'NY_02.xml', 'NY_03.xml', 'NY_04.xml', 'NY_05.xml', 'NY_06.xml', 'NY_07.xml', 'NY_08.xml', 'NY_09.xml', 'NY_10.xml', 'NY_11.xml', 'NY_12.xml', 'NY_13.xml', 'NY_14.xml', 'NY_15.xml', 'NY_16.xml', 'NY_17.xml', 'NY_18.xml', 'NY_19.xml', 'NY_20.xml', 'NY_21.xml', 'NY_22.xml', 'NY_23.xml', 'NY_24.xml', 'NY_25.xml', 'NY_26.xml', 'NY_27.xml', 'NY_28.xml', 'NY_29.xml', 'NY_all_house_senate.xml', 'NY_all_house.xml', 'NY_all_senate.xml', 'NY_S0NY00287.xml', 'NY_S0NY00410.xml', 'NY_S0NY00477.xml', 'NY_S0NY00493.xml', 'NY_S0NY00550.xml', 'NY_S0NY00576.xml', 'NY_S0NY00584.xml', 'NY_S0NY00592.xml', 'NY_S0NY00600.xml', 'NY_S0NY00626.xml', 'NY_S6NY00268.xml', 'NY_S8NY00082.xml', 'OH_01.xml', 'OH_02.xml', 'OH_03.xml', 'OH_04.xml', 'OH_05.xml', 'OH_06.xml', 'OH_07.xml', 'OH_08.xml', 'OH_09.xml', 'OH_10.xml', 'OH_11.xml', 'OH_12.xml', 'OH_13.xml', 'OH_14.xml', 'OH_15.xml', 'OH_16.xml', 'OH_17.xml', 'OH_18.xml', 'OH_all_house_senate.xml', 'OH_all_house.xml', 'OH_all_senate.xml', 'OH_S0OH00133.xml', 'OH_S0OH00141.xml', 'OH_S0OH00158.xml', 'OH_S0OH00182.xml', 'OH_S0OH00190.xml', 'OH_S0OH00208.xml', 'OH_S0OH00257.xml', 'OH_S0OH00265.xml', 'OK_01.xml', 'OK_02.xml', 'OK_03.xml', 'OK_04.xml', 'OK_05.xml', 'OK_all_house_senate.xml', 'OK_all_house.xml', 'OK_all_senate.xml', 'OK_S0OK00305.xml', 'OK_S4OK00174.xml', 'OK_S8OK00225.xml', 'OK_S8OK00241.xml', 'OR_01.xml', 'OR_02.xml', 'OR_03.xml', 'OR_04.xml', 'OR_05.xml', 'OR_all_house_senate.xml', 'OR_all_house.xml', 'OR_all_senate.xml', 'OR_S0OR00196.xml', 'OR_S0OR00204.xml', 'OR_S0OR00212.xml', 'OR_S0OR00220.xml', 'OR_S0OR00238.xml', 'OR_S0OR00303.xml', 'OR_S4OR00065.xml', 'OR_S6OR00110.xml', 'PA_01.xml', 'PA_02.xml', 'PA_03.xml', 'PA_04.xml', 'PA_05.xml', 'PA_06.xml', 'PA_07.xml', 'PA_08.xml', 'PA_09.xml', 'PA_10.xml', 'PA_11.xml', 'PA_12.xml', 'PA_13.xml', 'PA_14.xml', 'PA_15.xml', 'PA_16.xml', 'PA_17.xml', 'PA_18.xml', 'PA_19.xml', 'PA_all_house_senate.xml', 'PA_all_house.xml', 'PA_all_senate.xml', 'PA_S0PA00376.xml', 'PA_S0PA00384.xml', 'PA_S0PA00400.xml', 'PA_S0PA00426.xml', 'PA_S0PA00434.xml', 'PA_S0PA00442.xml', 'PA_S0PA00475.xml', 'PA_S4PA00121.xml', 'PA_S6PA00100.xml', 'RI_01.xml', 'RI_02.xml', 'RI_all_house_senate.xml', 'RI_all_house.xml', 'RI_all_senate.xml', 'SC_01.xml', 'SC_02.xml', 'SC_03.xml', 'SC_04.xml', 'SC_05.xml', 'SC_06.xml', 'SC_all_house_senate.xml', 'SC_all_house.xml', 'SC_all_senate.xml', 'SC_S0SC00164.xml', 'SC_S0SC00172.xml', 'SC_S0SC00180.xml', 'SC_S0SC00214.xml', 'SC_S0SC00222.xml', 'SC_S4SC00083.xml', 'SD_01.xml', 'SD_all_house_senate.xml', 'SD_all_house.xml', 'SD_all_senate.xml', 'SD_S2SD00068.xml', 'TN_01.xml', 'TN_02.xml', 'TN_03.xml', 'TN_04.xml', 'TN_05.xml', 'TN_06.xml', 'TN_07.xml', 'TN_08.xml', 'TN_09.xml', 'TN_all_house_senate.xml', 'TN_all_house.xml', 'TN_all_senate.xml', 'TX_01.xml', 'TX_02.xml', 'TX_03.xml', 'TX_04.xml', 'TX_05.xml', 'TX_06.xml', 'TX_07.xml', 'TX_08.xml', 'TX_09.xml', 'TX_10.xml', 'TX_11.xml', 'TX_12.xml', 'TX_13.xml', 'TX_14.xml', 'TX_15.xml', 'TX_16.xml', 'TX_17.xml', 'TX_18.xml', 'TX_19.xml', 'TX_20.xml', 'TX_21.xml', 'TX_22.xml', 'TX_23.xml', 'TX_24.xml', 'TX_25.xml', 'TX_26.xml', 'TX_27.xml', 'TX_28.xml', 'TX_29.xml', 'TX_30.xml', 'TX_31.xml', 'TX_32.xml', 'TX_all_house_senate.xml', 'TX_all_house.xml', 'TX_all_senate.xml', 'UT_01.xml', 'UT_02.xml', 'UT_03.xml', 'UT_all_house_senate.xml', 'UT_all_house.xml', 'UT_all_senate.xml', 'UT_S0UT00116.xml', 'UT_S0UT00124.xml', 'UT_S0UT00132.xml', 'UT_S0UT00140.xml', 'UT_S0UT00157.xml', 'UT_S0UT00165.xml', 'UT_S0UT00173.xml', 'UT_S0UT00199.xml', 'UT_S0UT00207.xml', 'UT_S2UT00104.xml', 'UT_S6UT00188.xml', 'VA_01.xml', 'VA_02.xml', 'VA_03.xml', 'VA_04.xml', 'VA_05.xml', 'VA_06.xml', 'VA_07.xml', 'VA_08.xml', 'VA_09.xml', 'VA_10.xml', 'VA_11.xml', 'VA_all_house_senate.xml', 'VA_all_house.xml', 'VA_all_senate.xml', 'VI_01.xml', 'VI_all_house_senate.xml', 'VI_all_house.xml', 'VI_all_senate.xml', 'VT_01.xml', 'VT_all_house_senate.xml', 'VT_all_house.xml', 'VT_all_senate.xml', 'VT_S0VT00106.xml', 'VT_S0VT00114.xml', 'VT_S4VT00017.xml', 'WA_01.xml', 'WA_02.xml', 'WA_03.xml', 'WA_04.xml', 'WA_05.xml', 'WA_06.xml', 'WA_07.xml', 'WA_08.xml', 'WA_09.xml', 'WA_all_house_senate.xml', 'WA_all_house.xml', 'WA_all_senate.xml', 'WA_S0WA00209.xml', 'WA_S0WA00225.xml', 'WA_S0WA00233.xml', 'WA_S0WA00241.xml', 'WA_S0WA00258.xml', 'WA_S0WA00266.xml', 'WA_S0WA00282.xml', 'WA_S0WA00290.xml', 'WA_S0WA00308.xml', 'WA_S0WA00316.xml', 'WA_S0WA00357.xml', 'WA_S2WA00189.xml', 'WI_01.xml', 'WI_02.xml', 'WI_03.xml', 'WI_04.xml', 'WI_05.xml', 'WI_06.xml', 'WI_07.xml', 'WI_08.xml', 'WI_all_house_senate.xml', 'WI_all_house.xml', 'WI_all_senate.xml', 'WI_S0WI00163.xml', 'WI_S0WI00171.xml', 'WI_S0WI00189.xml', 'WI_S0WI00197.xml', 'WI_S0WI00205.xml', 'WI_S8WI00026.xml', 'WV_01.xml', 'WV_02.xml', 'WV_03.xml', 'WV_all_house_senate.xml', 'WV_all_house.xml', 'WV_all_senate.xml', 'WV_S0WV00090.xml', 'WV_S0WV00108.xml', 'WV_S0WV00140.xml', 'WV_S0WV00157.xml', 'WV_S0WV00173.xml', 'WV_S4WV00084.xml', 'WV_S6WV00139.xml', 'WV_S8WV00101.xml', 'WY_01.xml', 'WY_all_house_senate.xml', 'WY_all_house.xml', 'WY_all_senate.xml']: url = FECDISPURL + filename data[filename] = cache.cacheweb(url) return data
def lobbyist_bundle(): u''' ''' url = FECDATAURL + '/LobbyistBundle.do?format=xml' return cache.cacheweb(url)
def leadership(): u''' ''' url = FECDATAURL + '/Leadership.do?format=xml' return cache.cacheweb(url)
def lobbyist(): u''' ''' url = FECDATAURL + '/Lobbyist.do?format=xml' return cache.cacheweb(url)