Coder Social home page Coder Social logo

achyuthjoism / tweeds Goto Github PK

View Code? Open in Web Editor NEW
178.0 6.0 33.0 280 KB

An advanced Twitter scraping & OSINT tool written in Python that doesn't use Twitter's API, allowing you to scrape a Tweets and more while evading most API limitations.

Home Page: https://dev.to/achyuthjoism/how-to-scrape-tweets-from-twitter-with-python-using-tweeds-4k2e

License: MIT License

Python 100.00%
hacking-tool osint osint-python twitter twitter-osint python scraper tweets twitter-api

tweeds's Issues

Order not found

┌──(kali㉿kali)-[~]
└─$ tweeds --help
tweeds: Order not found

blocked scraping

Hi, can you check the code? It seems the scraping is being blocked

scraper not working

Don't run on GitPod

I'm testing the code on Gitpod and it throws me several errors:

`Error retrieving https://api.twitter.com/2/search/adaptive.json?include_profile_interstitial_type=1&include_blocking=1&include_blocked_by=1&include_followed_by=1&include_want_retweets=1&include_mute_edge=1&include_can_dm=1&include_can_media_tag=1&include_ext_has_nft_avatar=1&include_ext_is_blue_verified=1&include_ext_verified_type=1&skip_status=1&cards_platform=Web-12&include_cards=1&include_ext_alt_text=true&include_ext_limited_action_results=false&include_quote_count=true&include_reply_count=1&tweet_mode=extended&include_ext_collab_control=true&include_ext_views=true&include_entities=true&include_user_entities=true&include_ext_media_color=true&include_ext_media_availability=true&include_ext_sensitive_media_warning=true&include_ext_trusted_friends_metadata=true&send_error_codes=true&simple_quoted_tweet=true&q=%28from%3AFuturoVegetal%29+&tweet_search_mode=live&count=20&query_source=spelling_expansion_revert_click&pc=1&spelling_corrections=1&include_ext_edit_control=true&ext=mediaStats%2ChighlightedLabel%2ChasNftAvatar%2CvoiceInfo%2Cenrichments%2CsuperFollowMetadata%2CunmentionInfo%2CeditControl%2Ccollab_control%2Cvibe: blocked (403)

4 requests to https://api.twitter.com/2/search/adaptive.json?include_profile_interstitial_type=1&include_blocking=1&include_blocked_by=1&include_followed_by=1&include_want_retweets=1&include_mute_edge=1&include_can_dm=1&include_can_media_tag=1&include_ext_has_nft_avatar=1&include_ext_is_blue_verified=1&include_ext_verified_type=1&skip_status=1&cards_platform=Web-12&include_cards=1&include_ext_alt_text=true&include_ext_limited_action_results=false&include_quote_count=true&include_reply_count=1&tweet_mode=extended&include_ext_collab_control=true&include_ext_views=true&include_entities=true&include_user_entities=true&include_ext_media_color=true&include_ext_media_availability=true&include_ext_sensitive_media_warning=true&include_ext_trusted_friends_metadata=true&send_error_codes=true&simple_quoted_tweet=true&q=%28from%3AFuturoVegetal%29+&tweet_search_mode=live&count=20&query_source=spelling_expansion_revert_click&pc=1&spelling_corrections=1&include_ext_edit_control=true&ext=mediaStats%2ChighlightedLabel%2ChasNftAvatar%2CvoiceInfo%2Cenrichments%2CsuperFollowMetadata%2CunmentionInfo%2CeditControl%2Ccollab_control%2Cvibe failed, giving up.
Errors: blocked (403), blocked (403), blocked (403), blocked (403)

Traceback (most recent call last):
File "/workspace/.pyenv_mirror/user/3.11.1/bin/tweeds", line 8, in
sys.exit(main())
^^^^^^
File "/workspace/.pyenv_mirror/user/current/lib/python3.11/site-packages/tweeds/main.py", line 117, in main
process_args(args)
File "/workspace/.pyenv_mirror/user/current/lib/python3.11/site-packages/tweeds/main.py", line 51, in process_args
search(q)
File "/workspace/.pyenv_mirror/user/current/lib/python3.11/site-packages/tweeds/tweet_scrape.py", line 76, in search
for i, tweet in enumerate(api.TwitterSearchScraper(query).get_items()):
File "/workspace/.pyenv_mirror/user/current/lib/python3.11/site-packages/snscrape/modules/twitter.py", line 1546, in get_items
for obj in self._iter_api_data('https://api.twitter.com/2/search/adaptive.json', _TwitterAPIType.V2, params, paginationParams, cursor = self._cursor):
File "/workspace/.pyenv_mirror/user/current/lib/python3.11/site-packages/snscrape/modules/twitter.py", line 759, in _iter_api_data
obj = self._get_api_data(endpoint, apiType, reqParams)

File "/workspace/.pyenv_mirror/user/current/lib/python3.11/site-packages/snscrape/modules/twitter.py", line 725, in _get_api_data
r = self._get(endpoint, params = params, headers = self._apiHeaders, responseOkCallback = self._check_api_response)

File "/workspace/.pyenv_mirror/user/current/lib/python3.11/site-packages/snscrape/base.py", line 225, in _get
return self._request('GET', *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspace/.pyenv_mirror/user/current/lib/python3.11/site-packages/snscrape/base.py", line 221, in _request
raise ScraperException(msg)

snscrape.base.ScraperException: 4 requests to https://api.twitter.com/2/search/adaptive.json?include_profile_interstitial_type=1&include_blocking=1&include_blocked_by=1&include_followed_by=1&include_want_retweets=1&include_mute_edge=1&include_can_dm=1&include_can_media_tag=1&include_ext_has_nft_avatar=1&include_ext_is_blue_verified=1&include_ext_verified_type=1&skip_status=1&cards_platform=Web-12&include_cards=1&include_ext_alt_text=true&include_ext_limited_action_results=false&include_quote_count=true&include_reply_count=1&tweet_mode=extended&include_ext_collab_control=true&include_ext_views=true&include_entities=true&include_user_entities=true&include_ext_media_color=true&include_ext_media_availability=true&include_ext_sensitive_media_warning=true&include_ext_trusted_friends_metadata=true&send_error_codes=true&simple_quoted_tweet=true&q=%28from%3AFuturoVegetal%29+&tweet_search_mode=live&count=20&query_source=spelling_expansion_revert_click&pc=1&spelling_corrections=1&include_ext_edit_control=true&ext=mediaStats%2ChighlightedLabel%2ChasNftAvatar%2CvoiceInfo%2Cenrichments%2CsuperFollowMetadata%2CunmentionInfo%2CeditControl%2Ccollab_control%2Cvibe failed, giving up.`

Cant you help me or explain me? I have reinstalled using 'pip install tweeds' and still get the same errors

Issue with since when attempting to filter with hours (--since)

When you type tweeds -s "node" --since "2022-12-30" --json file.json it works perfectly.

But adding the time to the --since parameter like this : tweeds -s "node" --since "2022-12-30 12:00:00" --json file.json Nothing is given(0 Results).

I believe there is an issue with the hours condition.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.