Module Expr Str Import alias Import alias Import alias Import alias ImportFrom alias Import alias Import alias Assign NameStore Str Assign NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Str Str Expr Call AttributeLoad NameLoad attr Str Num Str Expr Call AttributeLoad NameLoad attr Str Num Str Expr Call AttributeLoad NameLoad attr Str NameLoad Str FunctionDef arguments args NameParam defaults body Expr Str TryExcept body Assign NameStore Call NameLoad NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body Print BinOpMod Str TupleLoad NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num NameLoad Return NameLoad If UnaryOpNot AttributeLoad NameLoad attr body Print Str Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str Assign NameStore Dict Str Str Str NameLoad Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad keyword NameLoad attr Assign NameStore SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Num Index Str Assign NameStore SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Num Index Str Print BinOpMod Str TupleLoad NameLoad NameLoad Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Dict Str Str Assign NameStore ListComp AttributeLoad AttributeLoad NameLoad attr attr comprehension NameStore NameLoad Assign NameStore ListLoad For NameStore NameLoad body TryExcept body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad handlers ExceptHandler type NameLoad name NameStore body Print Str NameLoad Print BinOpMod Str Call NameLoad NameLoad Return NameLoad decorator_list Assign NameStore Num Assign NameStore Num Assign NameStore ListLoad TupleLoad BinOpMult Num NameLoad BinOpMult Num NameLoad TupleLoad BinOpMult Num NameLoad BinOpMult Num NameLoad Assign NameStore ListLoad Num Num Assign NameStore Num Assign NameStore Num Assign NameStore ListLoad Str Str Assign NameStore ListLoad Str Str Str Str Assign NameStore Str ClassDef bases body FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Num Expr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr SubscriptLoad SubscriptLoad NameLoad Index AttributeLoad NameLoad attr Index Num decorator_list FunctionDef arguments args NameParam defaults body Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body If AttributeLoad NameLoad attr body Raise NameLoad Assign NameStore BinOpAdd NameLoad ListLoad BinOpMod Str SubscriptLoad NameLoad Index AttributeLoad NameLoad attr BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Print BinOpMod Str Call AttributeLoad Str attr Call NameLoad NameLoad keyword Lambda arguments args NameParam defaults Call NameLoad SubscriptLoad Call AttributeLoad NameLoad attr Str Num Index Num Assign NameStore Dict Str Str AttributeLoad NameLoad attr Num For TupleStore NameStore NameStore Call NameLoad NameLoad body Assign SubscriptStore NameLoad Index BinOpMod Str BinOpAdd NameLoad Num NameLoad Print BinOpMod Str TupleLoad SubscriptLoad NameLoad Index AttributeLoad NameLoad attr AttributeLoad NameLoad attr BinOpDiv AttributeLoad NameLoad attr NameLoad BinOpDiv AttributeLoad NameLoad attr NameLoad If CompareNotEq AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr BinOpAdd AttributeLoad NameLoad attr Num AugAssignAdd AttributeStore NameLoad attr NameLoad If CompareGt AttributeLoad NameLoad attr SubscriptLoad SubscriptLoad NameLoad Index AttributeLoad NameLoad attr Index Num body Assign AttributeStore NameLoad attr NameLoad orelse If CompareNotEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body AugAssignAdd AttributeStore NameLoad attr Num Expr Call AttributeLoad NameLoad attr orelse If CompareEq AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr orelse Assign AttributeStore NameLoad attr NameLoad Return TupleLoad NameLoad AttributeLoad NameLoad attr IfExp AttributeLoad NameLoad attr Str Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Pass decorator_list decorator_list FunctionDef arguments args NameParam defaults body If UnaryOpNot Call NameLoad NameLoad body Print Str Expr Call AttributeLoad NameLoad attr Num Assign NameStore Dict Str AttributeLoad NameLoad attr Print Str NameLoad Assign TupleStore NameStore NameStore Call NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad Call AttributeLoad Str attr ListComp SubscriptLoad NameLoad Index Num comprehension NameStore Call AttributeLoad NameLoad attr attr Assign NameStore BinOpMod Str TupleLoad NameLoad Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr attr Str Print Str NameLoad Assign NameStore Call NameLoad NameLoad Str Print NameLoad Str Assign NameStore ListLoad Assign NameStore Call NameLoad NameLoad For TupleStore NameStore NameStore NameStore NameLoad body Pass While NameLoad body Print Str Expr Call AttributeLoad NameLoad attr Num Print Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad Print Str If CompareNotEq AttributeLoad NameLoad attr Num body Print Str orelse Assign NameStore Call NameLoad AttributeLoad NameLoad attr For NameStore NameLoad body Print NameLoad Call AttributeLoad Str attr ListLoad Call NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Break Expr Call AttributeLoad NameLoad attr Print BinOpMod Str Call NameLoad NameLoad decorator_list If CompareEq NameLoad Str body Expr Call NameLoad AttributeLoad NameLoad attr
N/A N/A 

First version created on 2012-06-25
@author: Everett Wetchler (evee746)
 N/A csv N/A datetime N/A sys N/A time BeautifulSoup BeautifulSoup N/A gflags N/A requests N/A DEFAULT_COOKIE 1780687262307760404%3a151924852332704912 N/A FLAGS N/A gflags FLAGS N/A N/A N/A gflags DEFINE_string location 94123 Zip or city name N/A N/A N/A gflags DEFINE_integer age_min 21 Minimum age to pull N/A N/A N/A gflags DEFINE_integer age_max 40 Maximum age to pull N/A N/A N/A gflags DEFINE_string session_cookie DEFAULT_COOKIE See comments at the top for how to find your OKC session cookie. prepare_flags N/A N/A argv N/A N/A N/A Set up flags. Returns true if the flag settings are acceptable. N/A N/A N/A argv N/A FLAGS argv N/A N/A N/A N/A gflags FlagsError N/A e N/A N/A N/A %s\nUsage: %s ARGS\n%s N/A e N/A N/A sys argv N/A 0 FLAGS N/A False N/A N/A N/A FLAGS session_cookie N/A N/A Please specify --session_cookie N/A False N/A True N/A fetch_location N/A N/A location N/A N/A N/A Queries OKCupid to get their location identifier number.

    The match search GET params require a "location id", which is an integer
    that represents a geographic area. We need to look up this id from the name
    of the city or region. For example, as of this writing,
    San Francisco will map to 4265540, NYC to 4335338.
     N/A url http://www.okcupid.com/locquery N/A params N/A func query query location N/A r N/A N/A N/A N/A requests get url params params json N/A name N/A N/A N/A r N/A results N/A 0 N/A text N/A locid N/A N/A N/A r N/A results N/A 0 N/A locid N/A N/A Ahhh %s. Location id is %d N/A name locid N/A N/A name locid N/A extract_usernames N/A N/A html N/A N/A N/A Parse the match search result page for usernames. N/A soup N/A BeautifulSoup html N/A usernames N/A N/A soup findAll name div attrs N/A class username N/A usernames N/A N/A N/A u a text N/A u usernames N/A plaintext_usernames N/A N/A u usernames N/A N/A N/A N/A N/A N/A plaintext_usernames append N/A str u N/A N/A N/A UnicodeError N/A e N/A N/A Skipping funky username u N/A N/A Found %d viable usernames N/A len plaintext_usernames N/A plaintext_usernames N/A N/A HEIGHT_MAX 99999 N/A INCH 254 N/A GENDER_HEIGHT_RANGES N/A N/A N/A 60 INCH N/A 70 INCH N/A N/A 64 INCH N/A 75 INCH N/A GENDER_TO_ORIENTATION_PARAM N/A 42 21 N/A WOMEN 0 N/A MEN 1 N/A GENDER_TO_STRING N/A Women Men N/A MATCH_DEFAULT_FILTERS N/A 1,1 3,25 5,604800 35,2 N/A MATCH_URL http://www.okcupid.com/match SliceGenerator N/A N/A __init__ N/A N/A self locid N/A N/A N/A N/A self locid locid N/A N/A self age N/A FLAGS age_min N/A N/A self gender WOMEN N/A N/A self height_low 0 N/A N/A self height_high 0 N/A N/A N/A self reset_height N/A N/A self stop False N/A reset_height N/A N/A self N/A N/A N/A N/A self height_low 0 N/A N/A self height_high N/A N/A GENDER_HEIGHT_RANGES N/A N/A self gender N/A 0 N/A __iter__ N/A N/A self N/A N/A N/A self N/A next N/A N/A self N/A N/A N/A N/A self stop N/A N/A StopIteration N/A filters N/A MATCH_DEFAULT_FILTERS N/A N/A 0,%d N/A GENDER_TO_ORIENTATION_PARAM N/A N/A self gender N/A 2,%d,%d N/A N/A self age N/A self age N/A 10,%d,%d N/A N/A self height_low N/A self height_high N/A N/A Filters: %s N/A N/A join N/A sorted filters key N/A N/A N/A x N/A N/A int N/A N/A N/A x split , 1 N/A 0 N/A params N/A locid count N/A self locid 1000 N/A N/A i f N/A enumerate filters N/A N/A N/A params N/A N/A filter%d N/A i 1 f N/A N/A Next slice: %s, age %d, height (%d-%d"] N/A N/A GENDER_TO_STRING N/A N/A self gender N/A self age N/A N/A self height_low INCH N/A N/A self height_high INCH N/A N/A N/A self height_high HEIGHT_MAX N/A N/A N/A self height_low N/A N/A self height_high 1 N/A N/A self height_high INCH N/A N/A N/A self height_high N/A N/A GENDER_HEIGHT_RANGES N/A N/A self gender N/A 1 N/A N/A N/A self height_high HEIGHT_MAX N/A N/A N/A N/A self age N/A FLAGS age_max N/A N/A N/A self age 1 N/A N/A N/A self reset_height N/A N/A N/A N/A self gender WOMEN N/A N/A N/A self gender MEN N/A N/A self age N/A FLAGS age_min N/A N/A N/A self reset_height N/A N/A N/A self stop True N/A N/A params N/A self age N/A N/A self gender m f N/A calibrate N/A N/A self num_results N/A N/A N/A N/A N/A main N/A N/A argv N/A N/A N/A N/A N/A prepare_flags argv N/A N/A Invalid flag settings. Exiting. N/A N/A N/A sys exit 1 N/A cookies N/A session N/A FLAGS session_cookie N/A Cookies: cookies N/A N/A location_name location_id N/A fetch_location N/A FLAGS location N/A cityabbrev N/A N/A N/A N/A join N/A N/A word N/A 0 N/A word N/A N/A location_name split lower N/A outfile N/A usernames.%s.%s.csv N/A cityabbrev N/A N/A N/A N/A N/A datetime date today strftime %Y%m%d N/A Saving to: outfile N/A f N/A open outfile w N/A f age,sex,username N/A all_usernames N/A N/A slice_gen N/A SliceGenerator location_id N/A N/A params age gender slice_gen N/A N/A N/A True N/A N/A Sleeping... N/A N/A N/A time sleep 2 N/A querying... N/A r N/A N/A requests get MATCH_URL params params cookies cookies N/A done. N/A N/A N/A r status_code 200 N/A N/A Request did not succeed. Will retry. N/A N/A usernames N/A extract_usernames N/A r text N/A u usernames N/A N/A f N/A N/A , join N/A N/A str age gender u N/A N/A N/A f flush N/A N/A N/A slice_gen calibrate N/A len usernames N/A N/A N/A all_usernames extend usernames N/A N/A N/A N/A f close N/A N/A Found %d total users N/A len all_usernames N/A N/A N/A __name__ __main__ N/A N/A N/A main N/A sys argv