Closed reddere closed 1 year ago
Hi, @reddere. You can use user_by_login
method and get id from User object. Do this cover what you need?
user = await api.user_by_login("twitter")
print(user.id, user.id_str)
thanks @vladkens ! Here's 2 more things I would consider bugs:
What about gather(api.user_tweets(tweeter_id, limit=1))
not returning 1 result? I am actually getting way more than one result. What is this due to?
the Tweet object does not return the full tweet text, take this one for example: https://twitter.com/FortniteStatus/status/1673714760473346048. the rawContent ends with 3 dots (apart for the tweet link), which just cuts the full text. What can I/you do to fix it?
Thanks in advance!
This is because twitter api return data in batches, like 20 tweets per request. Limit param stop iteration when total count of received tweets more that limit. So like limit=21, on first call we receive 20 tweets -> do next call -> +20 tweets (40 total received). Currently twscrape return all of this tweets. Maybe for not _raw methods need to filter count in code, and stop iteration. But not sure about this, more data is not less data.
Good catch. Need to update parser to support long messages.
limit
referring to? The number of batches?@vladkens
Hi, @reddere.
pip install --upgrade twscrape
Great @vladkens !
Lastly, ever thought about creating a community chat like a discord or telegram group? It would massively benefit everyone!
Hi. Limit fixed in v0.6.0
. To update use: pip install --upgrade twscrape
Thank you for issues
Thanks @vladkens ! So now, what would we need to do to keep it as it was? If setting the limit won't change my rate limit, it would be more convenient to get the whole batches of tweets
Also, feedback on 0.6.0: I had to downgrade to 0.5.0 as I wouldn't check the mail when logging in, for many logins I dont want to check the mail. I would also add a way to keep the original functionality of api.user_tweets(), keeping the original full batches
@vladkens
@reddere please create new tickets if you have questions.
login and batches restored in v0.7.0
Please, add a method that allows getting the ID from a username. Otherwise, we would manually search and convert those usernames to IDs. Thanks.