From b37bc4bc60b2a69b64a28b60faeb99482ecc5f10 Mon Sep 17 00:00:00 2001 From: Alessio Date: Mon, 1 Nov 2021 14:13:22 -0700 Subject: [PATCH] Add test data for tombstones --- .../tombstones/tombstone_deleted.json | 331 ++++++++++++++++++ .../tombstones/tombstone_hidden_1.json | 1 + 2 files changed, 332 insertions(+) create mode 100644 scraper/test_responses/tombstones/tombstone_deleted.json create mode 100644 scraper/test_responses/tombstones/tombstone_hidden_1.json diff --git a/scraper/test_responses/tombstones/tombstone_deleted.json b/scraper/test_responses/tombstones/tombstone_deleted.json new file mode 100644 index 0000000..096bb4f --- /dev/null +++ b/scraper/test_responses/tombstones/tombstone_deleted.json @@ -0,0 +1,331 @@ +{ + "globalObjects": + { + "tweets": + { + "1454524255127887878": + { + "created_at": "Sat Oct 30 19:03:00 +0000 2021", + "id_str": "1454524255127887878", + "full_text": "@TastefulTyrant Halloween is often the easiest night of the year but women do thirst trap, too.", + "display_text_range": + [ + 16, + 95 + ], + "entities": + { + "user_mentions": + [ + { + "screen_name": "TastefulTyrant", + "name": "ᴛᴀꜱᴛᴇꜰᴜʟ ᴛʏʀᴀɴᴛ", + "id_str": "1218687933391298560", + "indices": + [ + 0, + 15 + ] + } + ] + }, + "source": "Twitter Web App", + "in_reply_to_status_id_str": "1454521654781136902", + "in_reply_to_user_id_str": "1218687933391298560", + "in_reply_to_screen_name": "TastefulTyrant", + "user_id_str": "887434912529338375", + "retweet_count": 0, + "favorite_count": 12, + "reply_count": 0, + "quote_count": 0, + "conversation_id_str": "1454521654781136902", + "lang": "en" + } + }, + "users": + { + "887434912529338375": + { + "id_str": "887434912529338375", + "name": "Covfefe Anon", + "screen_name": "CovfefeAnon", + "location": "", + "description": "Not to be confused with 2001 Nobel Peace Prize winner Kofi Annan.\n\n54th Clause of the Magna Carta absolutist.\n\nCommentary from an NRx perspective.", + "entities": + { + "description": + {} + }, + "followers_count": 8386, + "fast_followers_count": 0, + "normal_followers_count": 8386, + "friends_count": 497, + "listed_count": 59, + "created_at": "Tue Jul 18 22:12:25 +0000 2017", + "favourites_count": 175661, + "statuses_count": 26334, + "media_count": 1755, + "profile_image_url_https": "https://pbs.twimg.com/profile_images/1392509603116617731/TDrNeUiZ_normal.jpg", + "profile_banner_url": "https://pbs.twimg.com/profile_banners/887434912529338375/1598514714", + "profile_image_extensions_alt_text": null, + "profile_image_extensions_media_color": + { + "palette": + [ + { + "rgb": + { + "red": 127, + "green": 125, + "blue": 102 + }, + "percentage": 34.13 + }, + { + "rgb": + { + "red": 68, + "green": 50, + "blue": 44 + }, + "percentage": 26.45 + }, + { + "rgb": + { + "red": 167, + "green": 170, + "blue": 176 + }, + "percentage": 12.16 + }, + { + "rgb": + { + "red": 102, + "green": 47, + "blue": 31 + }, + "percentage": 6.4 + }, + { + "rgb": + { + "red": 43, + "green": 52, + "blue": 65 + }, + "percentage": 3.54 + } + ] + }, + "profile_image_extensions_media_availability": null, + "profile_image_extensions": + { + "mediaStats": + { + "r": + { + "missing": null + }, + "ttl": -1 + } + }, + "profile_banner_extensions_alt_text": null, + "profile_banner_extensions_media_availability": null, + "profile_banner_extensions_media_color": + { + "palette": + [ + { + "rgb": + { + "red": 254, + "green": 254, + "blue": 254 + }, + "percentage": 44.66 + }, + { + "rgb": + { + "red": 122, + "green": 116, + "blue": 123 + }, + "percentage": 24.0 + }, + { + "rgb": + { + "red": 131, + "green": 164, + "blue": 104 + }, + "percentage": 18.44 + }, + { + "rgb": + { + "red": 50, + "green": 50, + "blue": 50 + }, + "percentage": 6.56 + }, + { + "rgb": + { + "red": 114, + "green": 156, + "blue": 99 + }, + "percentage": 2.85 + } + ] + }, + "profile_banner_extensions": + { + "mediaStats": + { + "r": + { + "missing": null + }, + "ttl": -1 + } + }, + "profile_link_color": "1B95E0", + "pinned_tweet_ids": + [ + 1005906691324596224 + ], + "pinned_tweet_ids_str": + [ + "1005906691324596224" + ], + "advertiser_account_type": "promotable_user", + "advertiser_account_service_levels": + [ + "analytics" + ], + "profile_interstitial_type": "", + "business_profile_state": "none", + "translator_type": "none", + "withheld_in_countries": + [], + "ext": + { + "highlightedLabel": + { + "r": + { + "ok": + {} + }, + "ttl": -1 + } + } + } + }, + "moments": + {}, + "cards": + {}, + "places": + {}, + "media": + {}, + "broadcasts": + {}, + "topics": + {}, + "lists": + {} + }, + "timeline": + { + "id": "Conversation-1454521654781136902", + "instructions": + [ + { + "addEntries": + { + "entries": + [ + { + "entryId": "tombstone-7768850382073638905", + "sortIndex": "7768850382073638905", + "content": + { + "item": + { + "content": + { + "tombstone": + { + "displayType": "Inline", + "tombstoneInfo": + { + "text": "", + "richText": + { + "text": "This Tweet was deleted by the Tweet author. Learn more", + "entities": + [ + { + "fromIndex": 44, + "toIndex": 54, + "ref": + { + "url": + { + "urlType": "ExternalUrl", + "url": "https://help.twitter.com/rules-and-policies/notices-on-twitter" + } + } + } + ], + "rtl": false + } + } + } + } + } + } + }, + { + "entryId": "tweet-1454524255127887878", + "sortIndex": "7768847781726887929", + "content": + { + "item": + { + "content": + { + "tweet": + { + "id": "1454524255127887878", + "displayType": "Tweet" + } + } + } + } + } + ] + } + }, + { + "terminateTimeline": + { + "direction": "Top" + } + } + ], + "responseObjects": + { + "feedbackActions": + {} + } + } +} diff --git a/scraper/test_responses/tombstones/tombstone_hidden_1.json b/scraper/test_responses/tombstones/tombstone_hidden_1.json new file mode 100644 index 0000000..94fba5c --- /dev/null +++ b/scraper/test_responses/tombstones/tombstone_hidden_1.json @@ -0,0 +1 @@ +{"globalObjects":{"tweets":{"1454526270809726977":{"created_at":"Sat Oct 30 19:11:01 +0000 2021","id_str":"1454526270809726977","full_text":"@periposeidion @gozunew \"Imagine telling a sturdy looking man he belongs doing physical labor\"\n\nDoes she think this doesn't happen as a way of ribbing a guy?\n\n\"Yo, lumberjack!\"","display_text_range":[24,176],"entities":{"user_mentions":[{"screen_name":"periposeidion","name":"👻Ghastly Guilherme🎃","id_str":"1365863538393309184","indices":[0,14]},{"screen_name":"gozunew","name":"Gozu","id_str":"1368198076645715968","indices":[15,23]}]},"source":"Twitter Web App","in_reply_to_status_id_str":"1454522147750260742","in_reply_to_user_id_str":"1365863538393309184","in_reply_to_screen_name":"periposeidion","user_id_str":"887434912529338375","retweet_count":0,"favorite_count":6,"reply_count":1,"quote_count":0,"conversation_id_str":"1454515503242829830","lang":"en"},"1454521424144654344":{"created_at":"Sat Oct 30 18:51:45 +0000 2021","id_str":"1454521424144654344","full_text":"@periposeidion Redditors make uninspired jokes as an underhanded way of simping. I must base my worldview off this. t. woman","display_text_range":[15,124],"entities":{"user_mentions":[{"screen_name":"periposeidion","name":"👻Ghastly Guilherme🎃","id_str":"1365863538393309184","indices":[0,14]}]},"source":"Twitter for Android","in_reply_to_status_id_str":"1454515503242829830","in_reply_to_user_id_str":"1365863538393309184","in_reply_to_screen_name":"periposeidion","user_id_str":"1368198076645715968","retweet_count":0,"favorite_count":6,"reply_count":1,"quote_count":0,"conversation_id_str":"1454515503242829830","lang":"en"}},"users":{"887434912529338375":{"id_str":"887434912529338375","name":"Covfefe Anon","screen_name":"CovfefeAnon","location":"","description":"Not to be confused with 2001 Nobel Peace Prize winner Kofi Annan.\n\n54th Clause of the Magna Carta absolutist.\n\nCommentary from an NRx perspective.","entities":{"description":{}},"followers_count":8386,"fast_followers_count":0,"normal_followers_count":8386,"friends_count":497,"listed_count":59,"created_at":"Tue Jul 18 22:12:25 +0000 2017","favourites_count":175661,"statuses_count":26334,"media_count":1755,"profile_image_url_https":"https://pbs.twimg.com/profile_images/1392509603116617731/TDrNeUiZ_normal.jpg","profile_banner_url":"https://pbs.twimg.com/profile_banners/887434912529338375/1598514714","profile_image_extensions_alt_text":null,"profile_image_extensions_media_color":{"palette":[{"rgb":{"red":127,"green":125,"blue":102},"percentage":34.13},{"rgb":{"red":68,"green":50,"blue":44},"percentage":26.45},{"rgb":{"red":167,"green":170,"blue":176},"percentage":12.16},{"rgb":{"red":102,"green":47,"blue":31},"percentage":6.4},{"rgb":{"red":43,"green":52,"blue":65},"percentage":3.54}]},"profile_image_extensions_media_availability":null,"profile_image_extensions":{"mediaStats":{"r":{"missing":null},"ttl":-1}},"profile_banner_extensions_alt_text":null,"profile_banner_extensions_media_availability":null,"profile_banner_extensions_media_color":{"palette":[{"rgb":{"red":254,"green":254,"blue":254},"percentage":44.66},{"rgb":{"red":122,"green":116,"blue":123},"percentage":24.0},{"rgb":{"red":131,"green":164,"blue":104},"percentage":18.44},{"rgb":{"red":50,"green":50,"blue":50},"percentage":6.56},{"rgb":{"red":114,"green":156,"blue":99},"percentage":2.85}]},"profile_banner_extensions":{"mediaStats":{"r":{"missing":null},"ttl":-1}},"profile_link_color":"1B95E0","pinned_tweet_ids":[1005906691324596224],"pinned_tweet_ids_str":["1005906691324596224"],"advertiser_account_type":"promotable_user","advertiser_account_service_levels":["analytics"],"profile_interstitial_type":"","business_profile_state":"none","translator_type":"none","withheld_in_countries":[],"ext":{"highlightedLabel":{"r":{"ok":{}},"ttl":-1}}},"1368198076645715968":{"id_str":"1368198076645715968","name":"Gozu","screen_name":"gozunew","location":"","description":"all that lives shall succumb","entities":{"description":{}},"followers_count":1168,"fast_followers_count":0,"normal_followers_count":1168,"friends_count":112,"listed_count":3,"created_at":"Sat Mar 06 13:53:49 +0000 2021","favourites_count":228427,"statuses_count":7474,"media_count":1160,"profile_image_url_https":"https://pbs.twimg.com/profile_images/1445552599864729605/izskVzDJ_normal.jpg","profile_banner_url":"https://pbs.twimg.com/profile_banners/1368198076645715968/1618189240","profile_image_extensions_alt_text":null,"profile_image_extensions_media_availability":null,"profile_image_extensions_media_color":{"palette":[{"rgb":{"red":0,"green":0,"blue":0},"percentage":68.51},{"rgb":{"red":52,"green":78,"blue":75},"percentage":11.68},{"rgb":{"red":124,"green":74,"blue":16},"percentage":5.63},{"rgb":{"red":69,"green":61,"blue":109},"percentage":5.47},{"rgb":{"red":208,"green":219,"blue":210},"percentage":1.97}]},"profile_image_extensions":{"mediaStats":{"r":{"missing":null},"ttl":-1}},"profile_banner_extensions_alt_text":null,"profile_banner_extensions_media_availability":null,"profile_banner_extensions_media_color":{"palette":[{"rgb":{"red":27,"green":25,"blue":30},"percentage":64.43},{"rgb":{"red":162,"green":160,"blue":165},"percentage":21.18},{"rgb":{"red":137,"green":131,"blue":113},"percentage":1.85},{"rgb":{"red":205,"green":199,"blue":236},"percentage":0.53},{"rgb":{"red":244,"green":197,"blue":210},"percentage":0.29}]},"profile_banner_extensions":{"mediaStats":{"r":{"missing":null},"ttl":-1}},"profile_link_color":"1DA1F2","default_profile":true,"pinned_tweet_ids":[1378353526842261510],"pinned_tweet_ids_str":["1378353526842261510"],"has_custom_timelines":true,"advertiser_account_type":"none","advertiser_account_service_levels":[],"profile_interstitial_type":"","business_profile_state":"none","translator_type":"none","withheld_in_countries":[],"ext":{"highlightedLabel":{"r":{"ok":{}},"ttl":-1}}}},"moments":{},"cards":{},"places":{},"media":{},"broadcasts":{},"topics":{},"lists":{}},"timeline":{"id":"Conversation-1454515503242829830","instructions":[{"addEntries":{"entries":[{"entryId":"tombstone-7768856533611945977","sortIndex":"7768856533611945977","content":{"item":{"content":{"tombstone":{"displayType":"Inline","tombstoneInfo":{"text":"","richText":{"text":"You’re unable to view this Tweet because this account owner limits who can view their Tweets. Learn more","entities":[{"fromIndex":94,"toIndex":104,"ref":{"url":{"urlType":"ExternalUrl","url":"https://help.twitter.com/rules-and-policies/notices-on-twitter"}}}],"rtl":false}}}}}}},{"entryId":"tweet-1454521424144654344","sortIndex":"7768850612710121463","content":{"item":{"content":{"tweet":{"id":"1454521424144654344","displayType":"Tweet"}}}}},{"entryId":"tombstone-7768849889104515065","sortIndex":"7768849889104515065","content":{"item":{"content":{"tombstone":{"displayType":"Inline","tombstoneInfo":{"text":"","richText":{"text":"You’re unable to view this Tweet because this account owner limits who can view their Tweets. Learn more","entities":[{"fromIndex":94,"toIndex":104,"ref":{"url":{"urlType":"ExternalUrl","url":"https://help.twitter.com/rules-and-policies/notices-on-twitter"}}}],"rtl":false}}}}}}},{"entryId":"tweet-1454526270809726977","sortIndex":"7768845766045048830","content":{"item":{"content":{"tweet":{"id":"1454526270809726977","displayType":"Tweet"}}}}},{"entryId":"cursor-showMoreThreads-7768845766045048829","sortIndex":"7768845766045048829","content":{"operation":{"cursor":{"value":"LBkGJQQRAAA=","cursorType":"ShowMoreThreads","displayTreatment":{"actionText":"Show more replies"}}}}}]}},{"terminateTimeline":{"direction":"Top"}}],"responseObjects":{"feedbackActions":{}}}}