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

Home timeline limited to 400 toots? #2301

Closed
FlyMyPG opened this Issue Apr 22, 2017 · 5 comments

Comments

Projects
None yet
3 participants
@FlyMyPG

FlyMyPG commented Apr 22, 2017

I'm working on a Python script that uses Mastodon.py to fetch all toots I've written on a given account/instance. I'm doing this by fetching the Home timeline, then filtering for my own toots (excluding boosts). It works great on new accounts with few toots, but seems to always stop at 400 toots (20 calls) on older accounts:

    toots=[]
    t = mastodon.timeline_home()  # Gets most recent first, oldest last
    while len(t) > 0:
        toots += t
        t = mastodon.timeline_home(max_id=t[-1]['id'])

Any clue why the above quits after 20 calls? Any way to go deeper?


  • I searched or browsed the repo’s other issues to ensure this is not a duplicate.
  • This bug happens on a tagged release and not on master (If you're a user, don't worry about this).
@FlyMyPG

This comment has been minimized.

Show comment
Hide comment
@FlyMyPG

FlyMyPG Apr 22, 2017

While I don't (yet) speak Ruby, I cloned the repo and grepped for "400" and found the following:

mastodon/app/lib/feed_manager.rb: MAX_ITEMS = 400

I don't know enough about Ruby to tell if it can be overridden, but that won't help me on the client side.

FlyMyPG commented Apr 22, 2017

While I don't (yet) speak Ruby, I cloned the repo and grepped for "400" and found the following:

mastodon/app/lib/feed_manager.rb: MAX_ITEMS = 400

I don't know enough about Ruby to tell if it can be overridden, but that won't help me on the client side.

@ashfurrow

This comment has been minimized.

Show comment
Hide comment
@ashfurrow

ashfurrow Apr 22, 2017

Collaborator

Looks like @Gargron was the last person to change that code. Not sure why we're limiting the feed – good question!

Collaborator

ashfurrow commented Apr 22, 2017

Looks like @Gargron was the last person to change that code. Not sure why we're limiting the feed – good question!

@FlyMyPG

This comment has been minimized.

Show comment
Hide comment
@FlyMyPG

FlyMyPG Apr 22, 2017

The feed for account statuses (browseable as https://some.mastodon.instance/@SomeUserName) does not appear to be limited.

FlyMyPG commented Apr 22, 2017

The feed for account statuses (browseable as https://some.mastodon.instance/@SomeUserName) does not appear to be limited.

@Gargron

This comment has been minimized.

Show comment
Hide comment
@Gargron

Gargron Jun 2, 2017

Member

The home feed is kept in memory, and when it's gone from memory, it has to be regenerated which is a long-running process. I figured nobody is likely to scroll back 400 items.

Member

Gargron commented Jun 2, 2017

The home feed is kept in memory, and when it's gone from memory, it has to be regenerated which is a long-running process. I figured nobody is likely to scroll back 400 items.

@FlyMyPG

This comment has been minimized.

Show comment
Hide comment
@FlyMyPG

FlyMyPG Nov 3, 2017

Sorry for not closing this sooner!

Workaround: Go to https://[instance]/@[user] to see a full history of toots.

However, when trying to get caught up with a user's toots, it is much easier to view them in the order posted, rather than most-recent first. The above URL does not support any other sort order than "most-recent first".

So I wrote a script: https://gist.github.com/FlyMyPG/2e9d4532453182ada0da78e74980193b

FlyMyPG commented Nov 3, 2017

Sorry for not closing this sooner!

Workaround: Go to https://[instance]/@[user] to see a full history of toots.

However, when trying to get caught up with a user's toots, it is much easier to view them in the order posted, rather than most-recent first. The above URL does not support any other sort order than "most-recent first".

So I wrote a script: https://gist.github.com/FlyMyPG/2e9d4532453182ada0da78e74980193b

@FlyMyPG FlyMyPG closed this Nov 3, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment