Module Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias alias alias alias ClassDef bases NameLoad body Expr Str Assign NameStore Str FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str keyword Call AttributeLoad NameLoad attr Str Assign NameStore ListComp NameLoad comprehension NameStore NameLoad CompareNotEq AttributeLoad Call AttributeLoad NameLoad attr Str attr Str Assign NameStore ListLoad For TupleStore NameStore NameStore Call NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore NameLoad Index Str Call AttributeLoad AttributeLoad Call AttributeLoad NameLoad attr Str attr attr Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Assign SubscriptStore NameLoad Index Str Call NameLoad SubscriptLoad SubscriptLoad NameLoad Index Str Slice Num Assign SubscriptStore NameLoad Index Str BinOpSub Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad Num Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Dict For NameStore Call AttributeLoad NameLoad attr Str Dict Str Call AttributeLoad NameLoad attr Str body Assign NameStore Call AttributeLoad NameLoad attr Str Dict Str Str If UnaryOpNot NameLoad body Continue Assign NameStore AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index NameLoad Dict For NameStore Call AttributeLoad NameLoad attr Str body Assign NameStore Call AttributeLoad NameLoad attr Str Dict Str Str If UnaryOpNot NameLoad body Continue If CompareGt AttributeLoad NameLoad attr Num body Expr Call AttributeLoad NameLoad attr BinOpMod Str AttributeLoad NameLoad attr Assign NameStore ListLoad For NameStore Call AttributeLoad NameLoad attr Str Dict Str Str body Expr Call AttributeLoad NameLoad attr Dict Str Str AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad NameLoad attr Str SubscriptLoad NameLoad Index Str attr Num For NameStore Call AttributeLoad NameLoad attr Str Dict Str Str body Expr Call AttributeLoad NameLoad attr Dict Str Str AttributeLoad NameLoad attr NameLoad Assign SubscriptStore SubscriptLoad NameLoad Index NameLoad Index AttributeLoad NameLoad attr NameLoad Return Dict Str Str Call NameLoad Call AttributeLoad Call AttributeLoad NameLoad attr Str NameLoad attr Num NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr BinOpMod Str Call NameLoad NameLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr BinOpMod Str SubscriptLoad NameLoad Index Str Assign TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword SubscriptLoad NameLoad Index Str keyword SubscriptLoad NameLoad Index Str keyword SubscriptLoad NameLoad Index Str keyword SubscriptLoad NameLoad Index Str If CompareGt AttributeLoad NameLoad attr Num body If NameLoad body Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad For NameStore Call AttributeLoad SubscriptLoad NameLoad Index Str attr body For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr NameLoad If CompareGt AttributeLoad NameLoad attr Num body If NameLoad body Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad For NameStore NameLoad body If UnaryOpNot SubscriptLoad NameLoad Index Str body Continue TryExcept body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Call NameLoad SubscriptLoad NameLoad Index Str Assign TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad keyword NameLoad keyword NameLoad If CompareGt AttributeLoad NameLoad attr Num body If NameLoad body Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr body Pass decorator_list decorator_list
N/A N/A re N/A urlparse time sleep calaccess_campaign_browser.management.commands ScrapeCommand calaccess_campaign_browser.models Election Office Candidate Filer Command N/A ScrapeCommand N/A N/A 
    Scraper to get the list of candidates per election.
     N/A help Scrape links between filers and elections from CAL-ACCESS site build_results N/A N/A self N/A N/A N/A N/A N/A self header Scraping election candidates N/A url N/A N/A urlparse urljoin N/A self base_url /Campaign/Candidates/list.aspx?view=certified&electNav=93 N/A soup N/A N/A self get url N/A links N/A N/A soup findAll a href N/A N/A re compile ^.*&electNav=\d+ N/A links N/A l N/A l links N/A N/A N/A N/A l find_next_sibling span text Prior Elections N/A results N/A N/A N/A i link N/A enumerate links N/A N/A url N/A N/A urlparse urljoin N/A self base_url N/A link N/A href N/A data N/A N/A self scrape_page url N/A N/A data N/A raw_name N/A N/A N/A N/A N/A link find_next_sibling span text strip N/A N/A data N/A election_type N/A N/A self parse_election_name N/A data N/A raw_name N/A N/A data N/A year N/A int N/A N/A data N/A raw_name N/A 4 N/A N/A data N/A sort_index N/A N/A len links i N/A N/A N/A results append data N/A N/A sleep 0.5 N/A results N/A scrape_page N/A N/A self url N/A N/A N/A 
        Pull the elections and candidates from a CAL-ACCESS page.
         N/A soup N/A N/A self get url N/A sections N/A N/A section N/A N/A soup findAll a N/A name N/A N/A re compile [a-z]+ N/A N/A section_name_el N/A N/A section find span N/A class hdr14 N/A N/A section_name_el N/A N/A N/A section_name N/A section_name_el text N/A N/A sections N/A section_name N/A N/A office N/A N/A section findAll td N/A N/A title_el N/A N/A office find span N/A class hdr13 N/A N/A title_el N/A N/A N/A N/A N/A self verbosity 2 N/A N/A N/A N/A self log N/A  Scraping office %s N/A title_el text N/A people N/A N/A p N/A N/A office findAll a N/A class sublink2 N/A N/A N/A N/A people append N/A name id N/A p text N/A N/A N/A N/A re match .+id=(\d+) N/A p N/A href group 1 N/A p N/A N/A office findAll span N/A class txt7 N/A N/A N/A N/A people append N/A name id N/A p text None N/A N/A N/A sections N/A section_name N/A N/A title_el text people N/A N/A id data N/A int N/A N/A N/A N/A re match .+electNav=(\d+) url group 1 sections N/A process_results N/A N/A self results N/A N/A N/A N/A N/A self log  Creating and/or updating models... N/A N/A N/A self log N/A   Found %s elections. N/A len results N/A d results N/A N/A N/A N/A self log N/A   Processing %s N/A d N/A raw_name N/A N/A election c N/A N/A N/A Election objects get_or_create year N/A d N/A year election_type N/A d N/A election_type id_raw N/A d N/A id sort_index N/A d N/A sort_index N/A N/A N/A self verbosity 2 N/A N/A c N/A N/A N/A N/A self log N/A   Created %s election N/A office_dict N/A N/A N/A d N/A data values N/A N/A N/A office_name candidates N/A N/A office_dict items N/A N/A N/A office c N/A N/A N/A Office objects get_or_create N/A N/A self parse_office_name office_name N/A N/A N/A self verbosity 2 N/A N/A c N/A N/A N/A N/A self log N/A   Created %s office N/A candidate candidates N/A N/A N/A N/A candidate N/A id N/A N/A N/A N/A N/A filer N/A N/A N/A Filer objects get filer_id_raw N/A int N/A candidate N/A id N/A N/A candidate c N/A N/A N/A Candidate objects get_or_create election election office office filer filer N/A N/A N/A self verbosity 2 N/A N/A c N/A N/A N/A N/A self log N/A   Created %s candidate N/A N/A N/A N/A Filer DoesNotExist N/A N/A N/A N/A