From 27732148550538b8a72f190b7b645739d129afe3 Mon Sep 17 00:00:00 2001 From: Alessio Date: Fri, 4 Feb 2022 17:34:15 -0800 Subject: [PATCH] Add test file for previous commit --- .../api_v2/tweet_with_poll.json | 390 ++++++++++++++++++ 1 file changed, 390 insertions(+) create mode 100644 scraper/test_responses/api_v2/tweet_with_poll.json diff --git a/scraper/test_responses/api_v2/tweet_with_poll.json b/scraper/test_responses/api_v2/tweet_with_poll.json new file mode 100644 index 0000000..0f64ab2 --- /dev/null +++ b/scraper/test_responses/api_v2/tweet_with_poll.json @@ -0,0 +1,390 @@ +{ + "result": + { + "__typename": "Tweet", + "rest_id": "1485692111106285571", + "core": + { + "user_results": + { + "result": + { + "__typename": "User", + "id": "VXNlcjo0NDA2NzI5OA==", + "rest_id": "44067298", + "affiliates_highlighted_label": + {}, + "has_nft_avatar": false, + "legacy": + { + "created_at": "Tue Jun 02 05:35:52 +0000 2009", + "default_profile": false, + "default_profile_image": false, + "description": "Author of Dear Reader, The New Right & The Anarchist Handbook\nHost of \"YOUR WELCOME\" \nSubject of Ego & Hubris by Harvey Pekar\nHe/Him ⚑\n@SheathUnderwear Model", + "entities": + { + "description": + { + "urls": + [] + }, + "url": + { + "urls": + [ + { + "display_url": "amzn.to/3oInafv", + "expanded_url": "https://amzn.to/3oInafv", + "url": "https://t.co/7VDFOOtFK2", + "indices": + [ + 0, + 23 + ] + } + ] + } + }, + "fast_followers_count": 0, + "favourites_count": 3840, + "followers_count": 334571, + "friends_count": 964, + "has_custom_timelines": false, + "is_translator": false, + "listed_count": 1434, + "location": "Austin", + "media_count": 9504, + "name": "Michael Malice", + "normal_followers_count": 334571, + "pinned_tweet_ids_str": + [ + "1477347403023982596" + ], + "profile_banner_extensions": + { + "mediaColor": + { + "r": + { + "ok": + { + "palette": + [ + { + "percentage": 60.59, + "rgb": + { + "blue": 0, + "green": 0, + "red": 0 + } + }, + { + "percentage": 18.77, + "rgb": + { + "blue": 64, + "green": 60, + "red": 156 + } + }, + { + "percentage": 3.62, + "rgb": + { + "blue": 31, + "green": 29, + "red": 77 + } + }, + { + "percentage": 3.22, + "rgb": + { + "blue": 215, + "green": 199, + "red": 138 + } + }, + { + "percentage": 2.83, + "rgb": + { + "blue": 85, + "green": 79, + "red": 215 + } + } + ] + } + } + } + }, + "profile_banner_url": "https://pbs.twimg.com/profile_banners/44067298/1615134676", + "profile_image_extensions": + { + "mediaColor": + { + "r": + { + "ok": + { + "palette": + [ + { + "percentage": 50.78, + "rgb": + { + "blue": 249, + "green": 247, + "red": 246 + } + }, + { + "percentage": 17.4, + "rgb": + { + "blue": 51, + "green": 51, + "red": 205 + } + }, + { + "percentage": 9.43, + "rgb": + { + "blue": 124, + "green": 139, + "red": 210 + } + }, + { + "percentage": 6.38, + "rgb": + { + "blue": 47, + "green": 63, + "red": 116 + } + }, + { + "percentage": 3.17, + "rgb": + { + "blue": 65, + "green": 45, + "red": 46 + } + } + ] + } + } + } + }, + "profile_image_url_https": "https://pbs.twimg.com/profile_images/1415820415314931715/_VVX4GI8_normal.jpg", + "profile_interstitial_type": "", + "protected": false, + "screen_name": "michaelmalice", + "statuses_count": 138682, + "translator_type": "none", + "url": "https://t.co/7VDFOOtFK2", + "verified": true, + "withheld_in_countries": + [] + }, + "super_follow_eligible": false, + "super_followed_by": false, + "super_following": false + } + } + }, + "card": + { + "rest_id": "card://1485692110472892424", + "legacy": + { + "binding_values": + [ + { + "key": "choice1_label", + "value": + { + "string_value": "1", + "type": "STRING" + } + }, + { + "key": "choice2_label", + "value": + { + "string_value": "2", + "type": "STRING" + } + }, + { + "key": "end_datetime_utc", + "value": + { + "string_value": "2022-01-25T19:12:56Z", + "type": "STRING" + } + }, + { + "key": "counts_are_final", + "value": + { + "boolean_value": false, + "type": "BOOLEAN" + } + }, + { + "key": "choice2_count", + "value": + { + "string_value": "702", + "type": "STRING" + } + }, + { + "key": "choice1_count", + "value": + { + "string_value": "891", + "type": "STRING" + } + }, + { + "key": "choice4_label", + "value": + { + "string_value": "E", + "type": "STRING" + } + }, + { + "key": "last_updated_datetime_utc", + "value": + { + "string_value": "2022-01-24T20:20:38Z", + "type": "STRING" + } + }, + { + "key": "duration_minutes", + "value": + { + "string_value": "1440", + "type": "STRING" + } + }, + { + "key": "choice3_count", + "value": + { + "string_value": "459", + "type": "STRING" + } + }, + { + "key": "choice4_count", + "value": + { + "string_value": "1801", + "type": "STRING" + } + }, + { + "key": "choice3_label", + "value": + { + "string_value": "C", + "type": "STRING" + } + }, + { + "key": "api", + "value": + { + "string_value": "capi://passthrough/1", + "type": "STRING" + } + }, + { + "key": "card_url", + "value": + { + "scribe_key": "card_url", + "string_value": "https://twitter.com", + "type": "STRING" + } + } + ], + "card_platform": + { + "platform": + { + "audience": + { + "name": "production" + }, + "device": + { + "name": "Swift", + "version": "12" + } + } + }, + "name": "poll4choice_text_only", + "url": "card://1485692110472892424", + "user_refs": + [] + } + }, + "legacy": + { + "created_at": "Mon Jan 24 19:12:56 +0000 2022", + "conversation_control": + { + "policy": "Community", + "conversation_owner": + { + "legacy": + { + "screen_name": "michaelmalice" + } + } + }, + "conversation_id_str": "1485692111106285571", + "display_text_range": + [ + 0, + 158 + ], + "entities": + { + "user_mentions": + [], + "urls": + [], + "hashtags": + [], + "symbols": + [] + }, + "favorite_count": 71, + "favorited": false, + "full_text": "Which of these would most make you feel a disconnect from someone else?\n\n1) They don't like music\n2) They don't like pets\nC) They don't read\nE) They are vegan", + "is_quote_status": false, + "lang": "en", + "possibly_sensitive": false, + "possibly_sensitive_editable": true, + "quote_count": 12, + "reply_count": 11, + "retweet_count": 16, + "retweeted": false, + "source": "Twitter Web App", + "user_id_str": "44067298", + "id_str": "1485692111106285571" + } + } +}