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

Bookmarks returning duplicates #240

Open
Neppu-Nep opened this issue Feb 11, 2025 · 0 comments
Open

Bookmarks returning duplicates #240

Neppu-Nep opened this issue Feb 11, 2025 · 0 comments

Comments

@Neppu-Nep
Copy link

get_bookmarks function returns a duplicate for each of the bookmarks.
while iter_bookmarks function seems to return the wrong count in the bookmark entity but the correct tweet count?

Seems like this line is causing the duplication problem

self.tweets.append(parsed)

Code to reproduce

import asyncio
import tweety

app = tweety.Twitter('twitterAccount')

async def main():
    await app.connect()
    async for bookmark, tweets in app.iter_bookmarks():
        print(bookmark)
        for tweet in tweets:
            print(tweet)

    print('--------------------------------')
    bookmarks = await app.get_bookmarks()
    for bookmark in bookmarks:
        print(bookmark)


if __name__ == '__main__':
    asyncio.run(main())

Image

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

1 participant