Module Import alias alias alias alias alias alias alias ClassDef bases body FunctionDef arguments args NameParam NameParam defaults body If UnaryOpNot NameLoad body Print Str Raise NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpAdd Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore SubscriptLoad SubscriptLoad SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Num Index Str Index Str Index Str Assign NameStore SubscriptLoad SubscriptLoad SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Num Index Str Index Str Index Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Num body Print Str Assign NameStore ListLoad Assign NameStore Num While CompareLt NameLoad NameLoad body Assign NameStore Call AttributeLoad Str attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr If CompareGt NameLoad Num body AugAssignAdd NameStore BinOpAdd Str Call NameLoad NameLoad Print Call AttributeLoad Str attr Call NameLoad NameLoad NameLoad SubscriptLoad Call AttributeLoad NameLoad attr Str Index Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Num Index Str Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Str Assign NameStore BinOpSub NameLoad Call NameLoad NameLoad If CompareLt BinOpSub NameLoad NameLoad Num body Expr Call AttributeLoad NameLoad attr SubscriptLoad SubscriptLoad NameLoad Index Str Slice NameLoad orelse Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str AugAssignAdd NameStore NameLoad Print Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults AttributeLoad NameLoad attr body Print Str Assign NameStore ListLoad Assign NameStore Num Assign NameStore Call NameLoad NameLoad While CompareLt NameLoad NameLoad body Assign NameStore Call AttributeLoad Str attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr If CompareLt NameLoad AttributeLoad NameLoad attr body AugAssignAdd NameStore BinOpAdd Str Call NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad orelse Assign NameStore Str Print Call AttributeLoad Str attr Call NameLoad NameLoad NameLoad SubscriptLoad Call AttributeLoad NameLoad attr Str Index Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Num Index Str If CompareLt NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str orelse For NameStore SubscriptLoad NameLoad Index Str body Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Str If CompareLt NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad orelse Break Print Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore ListLoad For NameStore NameLoad body Assign NameStore SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Index Str Assign NameStore SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr ListLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad If CompareEq AttributeLoad NameLoad attr Num body With Call NameLoad NameLoad Str NameStore body Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Return NameLoad orelse Print BinOpAdd Str NameLoad Return NameLoad decorator_list decorator_list If CompareEq NameLoad Str body Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Num If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Print Str For NameStore Call NameLoad Call NameLoad NameLoad body Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Num Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Num Assign NameStore BinOpAdd BinOpAdd BinOpAdd NameLoad NameLoad Str SubscriptLoad Call AttributeLoad NameLoad attr Str Index Num If Call AttributeLoad NameLoad attr NameLoad NameLoad body Print Call AttributeLoad Str attr BinOpAdd NameLoad Num Call NameLoad NameLoad NameLoad
N/A N/A sys requests json urllib shutil datetime os Downloader N/A N/A __init__ N/A N/A self clientid N/A N/A N/A N/A clientid N/A N/A Error: no instagram client id provided for Downloader class N/A SystemExit N/A N/A self clientid clientid N/A N/A self postsPerCall 40 N/A getGeoCoordinates N/A N/A self location N/A N/A N/A location N/A N/A urllib pathname2url location N/A maps_url N/A https://maps.googleapis.com/maps/api/geocode/json?address= location N/A r N/A N/A requests get maps_url N/A temp N/A N/A json dumps N/A N/A r json N/A js N/A N/A json loads temp N/A lat N/A N/A N/A N/A N/A js N/A results N/A 0 N/A geometry N/A location N/A lat N/A lng N/A N/A N/A N/A N/A js N/A results N/A 0 N/A geometry N/A location N/A lng N/A N/A self lat lat N/A N/A self lng lng N/A N/A lat lng N/A callAPI N/A N/A self postsRequested maxtimestamp N/A 0 N/A N/A ##################
>> CALLING API
##################
 N/A posts N/A N/A postCount 0 N/A N/A postCount postsRequested N/A N/A url N/A N/A https://api.instagram.com/v1/media/search?lat={0}&lng={1}&count={2}&client_id={3} format N/A self lat N/A self lng N/A self postsPerCall N/A self clientid N/A N/A maxtimestamp 0 N/A N/A url N/A &max_timestamp= N/A str maxtimestamp N/A N/A N/A got {0}/{1} posts, now using URL: .../{2} format N/A len posts postsRequested N/A N/A N/A url split / N/A -1 N/A r N/A N/A requests get url N/A current N/A N/A json dumps N/A N/A r json N/A current N/A N/A json loads current N/A maxtimestamp N/A N/A N/A current N/A data N/A -1 N/A created_time N/A postsInCall N/A len N/A current N/A data N/A stillNeeded N/A postsRequested N/A len posts N/A N/A N/A stillNeeded postsInCall 0 N/A N/A N/A N/A posts extend N/A N/A current N/A data N/A stillNeeded N/A N/A N/A N/A posts extend N/A current N/A data N/A postCount postsInCall N/A got all posts from Instagram API

 N/A posts N/A callAPIuntilTimestamp N/A N/A self mintimestamp maxtimestamp N/A N/A sys maxint N/A N/A ##################
>> CALLING API
##################
 N/A posts N/A N/A postCount 0 N/A mintimestamp N/A int mintimestamp N/A N/A mintimestamp maxtimestamp N/A N/A url N/A N/A https://api.instagram.com/v1/media/search?lat={0}&lng={1}&count={2}&client_id={3} format N/A self lat N/A self lng N/A self postsPerCall N/A self clientid N/A N/A maxtimestamp N/A sys maxint N/A N/A url N/A &max_timestamp= N/A str maxtimestamp N/A datestring N/A N/A N/A datetime datetime fromtimestamp maxtimestamp N/A N/A datestring today N/A N/A N/A got {0} posts until {1}, now using URL: .../{2} format N/A len posts datestring N/A N/A N/A url split / N/A -1 N/A r N/A N/A requests get url N/A current N/A N/A json dumps N/A N/A r json N/A current N/A N/A json loads current N/A maxtimestamp N/A int N/A N/A N/A current N/A data N/A -1 N/A created_time N/A N/A mintimestamp maxtimestamp N/A N/A N/A N/A posts extend N/A current N/A data N/A N/A post N/A current N/A data N/A N/A maxtimestamp N/A int N/A post N/A created_time N/A N/A mintimestamp maxtimestamp N/A N/A N/A N/A posts append post N/A N/A N/A got all posts from Instagram API

 N/A posts N/A getImageURLsAndTimestamps N/A N/A self posts N/A N/A N/A output N/A N/A post posts N/A N/A imageURL N/A N/A N/A post N/A images N/A standard_resolution N/A url N/A timestamp N/A post N/A created_time N/A N/A N/A output append N/A imageURL timestamp N/A output N/A downloadImage N/A N/A self url filename N/A N/A N/A r N/A N/A requests get url stream True N/A N/A N/A r status_code 200 N/A N/A N/A open filename wb f N/A N/A N/A N/A r raw decode_content True N/A N/A N/A shutil copyfileobj N/A r raw f N/A True N/A N/A N/A Bad status code for:  filename N/A False N/A N/A N/A N/A __name__ __main__ N/A N/A clientid N/A outdir test/ N/A location east lansing,mi N/A numberOfImgs 50 N/A N/A N/A N/A N/A os path exists outdir N/A N/A N/A N/A os makedirs outdir N/A client N/A Downloader clientid N/A N/A N/A client getGeoCoordinates location N/A posts N/A N/A client callAPI numberOfImgs N/A posts N/A N/A client getImageURLsAndTimestamps posts N/A 
##################
>> DOWNLOADING IMG
##################
 N/A i N/A range N/A len posts N/A N/A url N/A N/A posts N/A i N/A 0 N/A stamp N/A N/A posts N/A i N/A 1 N/A filename N/A N/A N/A outdir stamp _ N/A N/A N/A url split / N/A -1 N/A N/A N/A client downloadImage url filename N/A N/A N/A N/A >> downloaded img {0} of {1} {2} format N/A i 1 N/A len posts filename