Search Filters
You can filter the Search
function using these methods
Filter Latest Tweets
- class SearchFilters.Latest
- Reference:
tweety.filters.SearchFilters.Latest
from tweety.filters import SearchFilters # Assuming `app` is Twitter Client Object app.search("#pakistan", filter_=SearchFilters.Latest()) from tweet in tweets: print(tweet)
Filter Only Media Tweets
- class SearchFilters.Media
- Reference:
tweety.filters.SearchFilters.Media
from tweety.filters import SearchFilters # Assuming `app` is Twitter Client Object app.search("#pakistan", filter_=SearchFilters.Media()) from tweet in tweets: print(tweet.media)
Filter Only Users
- class SearchFilters.Users
- Reference:
tweety.filters.SearchFilters.Users
from tweety.filters import SearchFilters # Assuming `app` is Twitter Client Object app.search("#pakistan", filter_=SearchFilters.Users()) from user in users: print(user)
Tweet Audience Filter
You can filter the created Tweet Comment Audience function using these methods
Filter Only People You Mention
- class TweetConversationFilters.PeopleYouMention
- Reference:
tweety.filters.TweetConversationFilters.PeopleYouMention
from tweety.filters import TweetConversationFilters # Assuming `app` is Twitter Client Object app.create_tweet("Hi", filter_=TweetConversationFilters.PeopleYouMention())
Filter Only People You Follow
- class TweetConversationFilters.PeopleYouFollow
- Reference:
tweety.filters.TweetConversationFilters.PeopleYouFollow
from tweety.filters import TweetConversationFilters # Assuming `app` is Twitter Client Object app.create_tweet("Hi", filter_=TweetConversationFilters.PeopleYouFollow())
Language
You can translate Tweet in different Language , get Language code from here.
- Urdu = "ur"
- URDU = "ur"
- Russian = "ru"
- RUSSIAN = "ru"
- Danish = "da"
- DANISH = "da"
- Filipino = "fil"
- FILIPINO = "fil"
- Irish = "ga"
- IRISH = "ga"
- TraditionalChinese = "zh-tw"
- TRADITIONAL_CHINESE = "zh-tw"
- Hungarian = "hu"
- HUNGARIAN = "hu"
- Spanish = "es"
- SPANISH = "es"
- Arabic_Feminine = "ar-x-fm"
- ARABIC_FEMININE = "ar-x-fm"
- Croatian = "hr"
- CROATIAN = "hr"
- French = "fr"
- FRENCH = "fr"
- Kannada = "kn"
- KANNADA = "kn"
- Italian = "it"
- ITALIAN = "it"
- Marathi = "mr"
- MARATHI = "mr"
- Japanese = "ja"
- JAPANESE = "ja"
- Indonesian = "id"
- INDONESIAN = "id"
- Gujarati = "gu"
- GUJARATI = "gu"
- Romanian = "ro"
- ROMANIAN = "ro"
- Turkish = "tr"
- TURKISH = "tr"
- Basque = "eu"
- BASQUE = "eu"
- Swedish = "sv"
- SWEDISH = "sv"
- Tamil = "ta"
- TAMIL = "ta"
- Thai = "th"
- THAI = "th"
- Ukrainian = "uk"
- UKRAINIAN = "uk"
- Bangla = "bn"
- BANGLA = "bn"
- German = "de"
- GERMAN = "de"
- Vietnamese = "vi"
- VIETNAMESE = "vi"
- Catalan = "ca"
- CATALAN = "ca"
- Arabic = "ar"
- ARABIC = "ar"
- Dutch = "nl"
- DUTCH = "nl"
- SimplifiedChinese = "zh-cn"
- SIMPLIFIED_CHINESE = "zh-cn"
- Slovak = "sk"
- SLOVAK = "sk"
- Czech = "cs"
- CZECH = "cs"
- Greek = "el"
- GREEK = "el"
- Finnish = "fi"
- FINNISH = "fi"
- English = "en"
- ENGLISH = "en"
- Norwegian = "no"
- NORWEGIAN = "no"
- Polish = "pl"
- POLISH = "pl"
- Portuguese = "pt"
- PORTUGUESE = "pt"
- Persian = "fa"
- PERSIAN = "fa"
- Galician = "gl"
- GALICIAN = "gl"
- Korean = "ko"
- KOREAN = "ko"
- Serbian = "sr"
- SERBIAN = "sr"
- BritishEnglish = "en-gb"
- BRITISH_ENGLISH = "en-gb"
- Hindi = "hi"
- HINDI = "hi"
- Hebrew = "he"
- HEBREW = "he"
- Malay = "msa"
- MALAY = "msa"
- Bulgarian = "bg"
- BULGARIAN = "bg"
from tweety.filters import Language # Assuming `app` is Twitter Client Object app.translate_tweet("1234", filter_=Language.English)