Open githubbbie opened 3 years ago
yeah same issue here, anyone find a fix?
same
t version
3.1.0
t list add test test
/home/x/.gem/ruby/2.7.0/bin/t: Sorry, that page does not exist.
Ran into this as well. Looks like the issue is actually in list creation -- I can add members to lists I already have, but if I create a new list, its name in the twitter API has a number appended to it:
:) ~$ t list create gh-437
@mendel created the list "gh-437".
:) ~$ t lists | grep gh-437
@mendel/gh-437-12157
and then,
:) ~$ t list add gh-437-12157 jack
@mendel added 1 member to the list "gh-437-12157".
and it does what you'd expect:
So as a workaround:
t list create foo
t lists | grep foo
t list add foo-12345 <list of users>
I suspect the issue is an upstream change and thus belongs in https://github.com/sferik/twitter and not here but I've only glanced at it so far.
I suspect the issue is an upstream change and thus belongs in sferik/twitter
Okay, now that I've looked around I don't believe that anymore! sferik/twitter correctly notes that add_list_members
takes a slug (gh-437-12157
) and not a name (gh-437
), and has name
and slug
methods on a list
object, etc.
# @overload add_list_members(list, users, options = {})
# @param list [Integer, String, Twitter::List] A Twitter list ID, slug, URI, or object.
The problem is that t
accepts a name for list add
and doesn't resolve it to a slug. So I imagine what changed recently is that Twitter is not using list names and slugs interchangeably anymore. Their API docs show a slug that matches a list name save for case, so at one point it was interchangeable.
That's easy to fix one way or another, but before I do anything I'd love @sferik's thoughts on how this should work, esp. since you can now(?) have two lists with the same name (but different slugs).
Perhaps t list add
and other commands that take a list name should accept either a name or a slug, and resolve the name to a slug, and complain to the user if the name is not unique?
- Add your users to that:
t list add foo-12345 <list of users>
working for me now.
on a slightly related note, i think i hit a 24 hour rate limit (although I'm not sure where this is documented for lists) Maybe some how broke the 15000 / 24 hour because:
the first time i used t followings | xargs t list add
only 1200/5000 users were added to the list.
I tried this a few more times, and never got 5000/5000. Maybe some private accounts are excluded ?
so then i decided to split things up into chunks, and doing it in 50 increments seemed to be working.
(sed -n '1,50p' users.txt) | xargs t list add foo
i got to around 600 users in the list, and then it stopped working.and now nothing works. t
executes fine, but not even 1 user can be added to a list, and t
doesn't throw any rate limit messages like it does with t stream
surely there is a more efficient way to do this, but this is the closest 'working today' solution i've come across so far.
i think i hit a 24 hour rate limit (although I'm not sure where this is documented for lists)
Hah, yep, I hit it too while I was testing this out more!
There is apparently an undocumented list rate limit which is approximately(?) 1000/12 hours (although it might be something like 1000 members/12h + 300 members grace period after you hit it). Unfortunately it looks like when you hit that rate limit, the Twitter 1.1 API does nothing and returns success, so there's no way to tell that you hit it other than it not doing what you requested.
Some details here, although I only saw the "104" error there through the browser console on twitter.com, not through the API.
Hmmm @wlonkly, grep doesn't output anything for me when doing this here. Any ideas?
https://github.com/sferik/t/issues/437#issuecomment-752303872
Hmmm @wlonkly, grep doesn't output anything for me when doing this here. Any ideas?
@cprkrn Give me a little more context? What are you trying to do, and what is t lists
alone giving you?
@cprkrn looks like something else changed, probably upstream again. Here's what I see when I create a list and then list all my lists:
~ t list create following-`date "+%Y-%m-%d"`
@chadoh created the list "following-2022-08-23".
~ t lists
@chadoh/1561891375242547202 @chadoh/1562067642759843841
@chadoh/blockchain @chadoh/citrusbyte
@chadoh/codes @mattdlockyer/interesting-crypto-peeps-46301
@chadoh/lancaster-14909 @chadoh/near
@chadoh/philly @chadoh/politik
@chadoh/remote @chadoh/space
If I go to https://twitter.com/chadoh/lists/, I can see the "following-2022-08-23" list. If I click on it, I can see 1562067642759843841
in the URL. If I use that as the "name" of my list in list add
commands, it works.
So list names are no longer part of the list slug/id at all. That's why piping to grep and searching for the name you used shows nothing.
To make things easier, you can create a variable with the id of your list. This uses bash/zsh syntax; if you're on windows or in some other shells, you might need to look up how to set variables in that context:
~ export LIST=1562067642759843841
~ t list add $LIST account-name
No combination works.
Am able to create a list, but not add any users.