Permalink
Please sign in to comment.
Browse files
Merge pull request #319 from bear/alt-text_issue-316
Alt text - work for issue 316
- Loading branch information...
Showing
with
166 additions
and 73 deletions.
- +1 −0 testdata/get_status_ext_alt.json
- +100 −11 tests/test_api_30.py
- +64 −62 twitter/api.py
- +1 −0 twitter/models.py
1
testdata/get_status_ext_alt.json
| @@ -0,0 +1 @@ | ||
| +{"place": null, "favorite_count": 43, "possibly_sensitive": false, "retweet_count": 28, "id": 724441953534877696, "in_reply_to_user_id": null, "id_str": "724441953534877696", "coordinates": null, "favorited": false, "contributors": null, "in_reply_to_status_id": null, "text": "\u201cJon Snow is dead.\u201d\u200a\u2014\u200a@HBOPR https://t.co/8IK0pbcxIr https://t.co/jvZ3Koip6x", "user": {"default_profile_image": false, "screen_name": "Medium", "time_zone": "Pacific Time (US & Canada)", "notifications": false, "profile_use_background_image": false, "protected": false, "name": "Medium", "contributors_enabled": false, "followers_count": 1727713, "profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme14/bg.gif", "listed_count": 10639, "profile_link_color": "00AB69", "profile_image_url_https": "https://pbs.twimg.com/profile_images/672905320751083521/DqQkNLfW_normal.png", "id": 571202103, "profile_background_tile": true, "is_translator": false, "id_str": "571202103", "profile_image_url": "http://pbs.twimg.com/profile_images/672905320751083521/DqQkNLfW_normal.png", "following": false, "has_extended_profile": false, "profile_sidebar_border_color": "FFFFFF", "lang": "en", "url": "http://t.co/39nrCKtdRI", "is_translation_enabled": false, "location": "San Francisco, CA, US", "default_profile": false, "entities": {"url": {"urls": [{"url": "http://t.co/39nrCKtdRI", "display_url": "medium.com", "expanded_url": "http://medium.com", "indices": [0, 22]}]}, "description": {"urls": []}}, "verified": true, "created_at": "Fri May 04 20:16:39 +0000 2012", "utc_offset": -25200, "profile_background_color": "FFFFFF", "favourites_count": 4430, "statuses_count": 14794, "profile_background_image_url": "http://abs.twimg.com/images/themes/theme14/bg.gif", "profile_banner_url": "https://pbs.twimg.com/profile_banners/571202103/1444267389", "description": "Move thinking forward.", "geo_enabled": false, "follow_request_sent": false, "friends_count": 145, "profile_sidebar_fill_color": "EFEFEF", "profile_text_color": "333333"}, "lang": "en", "truncated": false, "is_quote_status": false, "in_reply_to_status_id_str": null, "entities": {"hashtags": [], "media": [{"id": 724441951391604736, "id_str": "724441951391604736", "media_url": "http://pbs.twimg.com/media/Cg28HdUWYAAvmwn.jpg", "media_url_https": "https://pbs.twimg.com/media/Cg28HdUWYAAvmwn.jpg", "type": "photo", "display_url": "pic.twitter.com/jvZ3Koip6x", "url": "https://t.co/jvZ3Koip6x", "sizes": {"large": {"resize": "fit", "w": 750, "h": 748}, "small": {"resize": "fit", "w": 340, "h": 339}, "thumb": {"resize": "crop", "w": 150, "h": 150}, "medium": {"resize": "fit", "w": 600, "h": 598}}, "expanded_url": "http://twitter.com/Medium/status/724441953534877696/photo/1", "indices": [53, 76]}], "user_mentions": [{"name": "HBO PR", "id": 2153490764, "id_str": "2153490764", "screen_name": "HBOPR", "indices": [22, 28]}], "symbols": [], "urls": [{"url": "https://t.co/8IK0pbcxIr", "display_url": "medium.com/hbo-cinemax-pr\u2026", "expanded_url": "https://medium.com/hbo-cinemax-pr/game-of-thrones-season-6-episodes-53586437cbb3#---0-17.cvym8cqn4", "indices": [29, 52]}]}, "retweeted": false, "in_reply_to_user_id_str": null, "created_at": "Mon Apr 25 03:36:35 +0000 2016", "in_reply_to_screen_name": null, "extended_entities": {"media": [{"id": 724441951391604736, "id_str": "724441951391604736", "media_url": "http://pbs.twimg.com/media/Cg28HdUWYAAvmwn.jpg", "media_url_https": "https://pbs.twimg.com/media/Cg28HdUWYAAvmwn.jpg", "type": "photo", "display_url": "pic.twitter.com/jvZ3Koip6x", "ext_alt_text": "\u201cJon Snow is dead.\u2026\u201d from \u201cGAME OF THRONES SEASON 6 EPISODES\u201d by HBO PR.", "url": "https://t.co/jvZ3Koip6x", "sizes": {"large": {"resize": "fit", "w": 750, "h": 748}, "small": {"resize": "fit", "w": 340, "h": 339}, "thumb": {"resize": "crop", "w": 150, "h": 150}, "medium": {"resize": "fit", "w": 600, "h": 598}}, "expanded_url": "http://twitter.com/Medium/status/724441953534877696/photo/1", "indices": [53, 76]}]}, "possibly_sensitive_appealable": false, "geo": null, "source": "<a href=\"https://medium.com\" rel=\"nofollow\">Medium</a>"} |
111
tests/test_api_30.py
126
twitter/api.py
1
twitter/models.py
0 comments on commit
c5e37b1