Projects STRLCPY snscrape Commits d5b406bc
🤬
  • Update API parameters to what Twitter currently uses

    The `count` reduction does not affect anything as Twitter ignores that parameter now. Cf. #481
  • Loading...
  • JustAnotherArchivist committed 2 years ago
    d5b406bc
    1 parent 50899c01
  • ■ ■ ■ ■ ■ ■
    snscrape/modules/twitter.py
    skipped 1413 lines
    1414 1414   'include_mute_edge': '1',
    1415 1415   'include_can_dm': '1',
    1416 1416   'include_can_media_tag': '1',
     1417 + 'include_ext_has_nft_avatar': '1',
    1417 1418   'skip_status': '1',
    1418 1419   'cards_platform': 'Web-12',
    1419 1420   'include_cards': '1',
    skipped 5 lines
    1425 1426   'include_user_entities': 'true',
    1426 1427   'include_ext_media_color': 'true',
    1427 1428   'include_ext_media_availability': 'true',
     1429 + 'include_ext_sensitive_media_warning': 'true',
     1430 + 'include_ext_trusted_friends_metadata': 'true',
    1428 1431   'send_error_codes': 'true',
    1429  - 'simple_quoted_tweets': 'true',
     1432 + 'simple_quoted_tweet': 'true',
    1430 1433   'q': self._query,
    1431 1434   'tweet_search_mode': 'live',
    1432  - 'count': '100',
     1435 + 'count': '20',
    1433 1436   'query_source': 'spelling_expansion_revert_click',
    1434 1437   'cursor': None,
    1435 1438   'pc': '1',
    1436 1439   'spelling_corrections': '1',
    1437  - 'ext': 'mediaStats,highlightedLabel',
     1440 + 'ext': 'mediaStats,highlightedLabel,hasNftAvatar,voiceInfo,enrichments,superFollowMetadata,unmentionInfo',
    1438 1441   }
    1439 1442   params = paginationParams.copy()
    1440 1443   del params['cursor']
    skipped 285 lines
    1726 1729   'include_mute_edge': '1',
    1727 1730   'include_can_dm': '1',
    1728 1731   'include_can_media_tag': '1',
     1732 + 'include_ext_has_nft_avatar': '1',
    1729 1733   'skip_status': '1',
    1730 1734   'cards_platform': 'Web-12',
    1731 1735   'include_cards': '1',
    skipped 5 lines
    1737 1741   'include_user_entities': 'true',
    1738 1742   'include_ext_media_color': 'true',
    1739 1743   'include_ext_media_availability': 'true',
     1744 + 'include_ext_sensitive_media_warning': 'true',
     1745 + 'include_ext_trusted_friends_metadata': 'true',
    1740 1746   'send_error_codes': 'true',
    1741 1747   'simple_quoted_tweet': 'true',
    1742 1748   'count': '20',
    1743 1749   'candidate_source': 'trends',
    1744 1750   'include_page_configuration': 'false',
    1745 1751   'entity_tokens': 'false',
    1746  - 'ext': 'mediaStats,highlightedLabel,voiceInfo',
     1752 + 'ext': 'mediaStats,highlightedLabel,hasNftAvatar,voiceInfo,enrichments,superFollowMetadata,unmentionInfo',
    1747 1753   }
    1748 1754   obj = self._get_api_data('https://twitter.com/i/api/2/guide.json', _TwitterAPIType.V2, params)
    1749 1755   for instruction in obj['timeline']['instructions']:
    skipped 9 lines
Please wait...
Page is in error, reload to recover