Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

t list add LISTNAME USERNAME says page not found #437

Open
githubbbie opened this issue Nov 10, 2020 · 9 comments
Open

t list add LISTNAME USERNAME says page not found #437

githubbbie opened this issue Nov 10, 2020 · 9 comments

Comments

@githubbbie
Copy link

/usr/local/bundle/bin/t: Sorry, that page does not exist.

No combination works.

t --version
3.1.0

Am able to create a list, but not add any users.

@adammenges
Copy link

yeah same issue here, anyone find a fix?

@user747
Copy link

user747 commented Dec 18, 2020

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.

@wlonkly
Copy link

wlonkly commented Dec 30, 2020

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:

screenshot of list "gh-437" with @jack as only member

So as a workaround:

  1. Create your list: t list create foo
  2. Find out what number was appended to the list name: t lists | grep foo
  3. Add your users to that: 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.

@wlonkly
Copy link

wlonkly commented Dec 30, 2020

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?

@user747
Copy link

user747 commented Jan 3, 2021

  1. 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.

@wlonkly
Copy link

wlonkly commented Jan 4, 2021

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.

@cprkrn
Copy link

cprkrn commented Aug 11, 2022

Hmmm @wlonkly, grep doesn't output anything for me when doing this here. Any ideas?

#437 (comment)

@wlonkly
Copy link

wlonkly commented Aug 11, 2022

Hmmm @wlonkly, grep doesn't output anything for me when doing this here. Any ideas?

#437 (comment)

@cprkrn Give me a little more context? What are you trying to do, and what is t lists alone giving you?

@chadoh
Copy link

chadoh commented Aug 23, 2022

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants