Skip to content
Tayyab Kharl edited this page Feb 12, 2025 · 8 revisions

FAQs

Not working on VPS/Server

Twitter blocks the request from several well known VPS/Server providers Like AWS or Google Cloud, make sure to use good proxy in that case

How to access the text/content or date of Tweet

Tweety returns a object in response of every of method , you can get the information by accessing the attributes of objects. For Instance : tweet_detail method will return the Tweet object, to get tweet text you can use .text attribute. More about objects here

Listen for New Tweets

  1. Best method to check for new tweets is using List
  2. You can also fetch tweets from New Tweet Notification using get_tweet_notifications

Note

Replies are only become part of list when both users involved in that reply are member of that list. If user2 is replying to user1 , the reply will only appear in list if user2 is also member of that list

Twitter New Limits

Twitter after Elon takeover has added many restrictions to whole platform. Some of them are:

  1. Tweets of a User can be fetched of last 7-10 days only , for going beyond that use Search method
  2. Tweets of a User when accessing without logging in are by default sorted according to number of likes and we can get only one page
  3. Getting a tweet detail without logging in will not fetch any comments on that Tweet
  4. Every method has rate limit as low as 50 requests per 15 minutes

Access the original Request JSON Response

By Default Tweety returns parsed object , but if you want to access the Original Response received from Twitter use the .get_raw() method.

Note

get_raw() method is only available with DataTypes who has parent Class of _TwType.

Proxy Support

Twitter class accepts optional argument proxy which can be a str or tweety.types.Proxy

from tweety import Twitter
from tweety.types import Proxy, PROXY_TYPE_HTTP

proxy = Proxy(host="127.0.0.1", port=8080, proxy_type=PROXY_TYPE_HTTP, username="username", password="password")

client = TwitterAsync("session", proxy=proxy)

# If the SSL certificate verification is failing 

client = TwitterAsync("session", proxy=proxy, verify=False)