Module Import alias alias alias alias alias alias ImportFrom alias alias alias ImportFrom alias ImportFrom alias alias ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr Str NameLoad attr Num Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr Str NameLoad attr Num Assign NameStore Call NameLoad NameLoad Return TupleLoad Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr Str attr TryExcept body Return Call AttributeLoad Call AttributeLoad NameLoad attr Str NameLoad attr Num handlers ExceptHandler body Pass decorator_list FunctionDef arguments args NameParam defaults body Assign TupleStore NameStore NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Num Assign NameStore Call AttributeLoad NameLoad attr Str TupleLoad Num Num TupleLoad Num Num Num Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Num Assign TupleStore NameStore NameStore TupleLoad Num Num For NameStore NameLoad body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr TupleLoad BinOpDiv BinOpSub Num NameLoad Num NameLoad NameLoad keyword NameLoad AugAssignAdd NameStore BinOpAdd NameLoad NameLoad AugAssignAdd NameStore Num Expr Call AttributeLoad NameLoad attr NameLoad TupleLoad Num NameLoad Return NameLoad decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body While NameLoad body Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad If CompareIs AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr NameLoad orelse If CompareNotEq AttributeLoad NameLoad attr NameLoad body Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str SubscriptLoad NameLoad Index Num Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad orelse Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Num decorator_list decorator_list If CompareEq NameLoad Str body Assign NameStore Call NameLoad Str Expr Call AttributeLoad NameLoad attr Str Str keyword NameLoad keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword NameLoad keyword NameLoad keyword Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr
N/A N/A time urllib2 textwrap re HTMLParser tempfile PIL Image ImageDraw ImageFont argparse ArgumentParser snapchat_bots SnapchatBot Snap snapchat_bots.utils resize_image N/A h N/A N/A HTMLParser HTMLParser get_article_info N/A N/A url N/A N/A N/A content N/A N/A N/A N/A urllib2 urlopen url read N/A description N/A N/A N/A N/A re search <meta name="Description" content="([^"]*) content group 1 N/A img_src N/A N/A N/A N/A re search <meta property="og:image" content="([^"]*) content group 1 N/A img N/A download_image img_src N/A N/A N/A N/A h unescape description img N/A download_image N/A N/A src N/A N/A N/A tmp N/A N/A tempfile NamedTemporaryFile suffix .jpg N/A N/A N/A tmp write N/A N/A N/A N/A urllib2 urlopen src read N/A img N/A N/A Image open N/A tmp name N/A img N/A get_last_breaking_news_url N/A N/A N/A N/A N/A content N/A N/A N/A N/A urllib2 urlopen https://twitter.com/BBCBreaking read N/A N/A N/A N/A N/A N/A N/A re search http://bbc.in[^<"]* content group 0 N/A N/A N/A N/A N/A create_breaking_news_image_from_info N/A N/A info N/A N/A N/A N/A title header_img info N/A para N/A N/A textwrap wrap title width 30 N/A im N/A N/A Image new RGB N/A 290 600 N/A 0 0 0 0 N/A draw N/A N/A ImageDraw Draw im N/A font N/A N/A ImageFont truetype resources/Arial.ttf 19 N/A N/A current_h pad N/A 100 10 N/A line para N/A N/A N/A w h N/A N/A draw textsize line font font N/A N/A N/A draw text N/A N/A N/A 290 w 2 current_h line font font N/A current_h N/A h pad N/A current_h 40 N/A N/A N/A im paste header_img N/A 0 current_h N/A im N/A ReporterBot N/A SnapchatBot N/A initialize N/A N/A self N/A N/A N/A N/A self last_tweet_url None N/A on_friend_add N/A N/A self friend N/A N/A N/A N/A N/A self add_friend friend N/A on_friend_delete N/A N/A self friend N/A N/A N/A N/A N/A self delete_friend friend N/A run N/A N/A self N/A N/A N/A True N/A N/A N/A N/A self log Checking news... N/A last_tweet_url N/A get_last_breaking_news_url N/A N/A N/A self last_tweet_url None N/A N/A N/A self last_tweet_url last_tweet_url N/A N/A N/A N/A self last_tweet_url last_tweet_url N/A N/A info N/A get_article_info last_tweet_url N/A N/A N/A self log N/A Found breaking news: %s N/A info N/A 0 N/A img N/A create_breaking_news_image_from_info info N/A snap N/A N/A Snap from_image img duration 10 N/A N/A N/A self send_snap N/A N/A self get_friends snap N/A N/A self last_tweet_url last_tweet_url N/A N/A N/A N/A self log No breaking news found N/A N/A N/A time sleep 60 N/A N/A N/A N/A __name__ __main__ N/A N/A parser N/A ArgumentParser Reporter Bot N/A N/A N/A parser add_argument -u --username required True type str help Username of the account to run the bot on N/A N/A N/A parser add_argument -p --password required True type str help Password of the account to run the bot on N/A args N/A N/A parser parse_args N/A bot N/A ReporterBot N/A args username N/A args password N/A N/A N/A bot run