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

Duplicating same tweets when following more users with Twitter-bot #697

Open
jiriryszawy opened this issue Jun 2, 2021 · 0 comments · May be fixed by #700
Open

Duplicating same tweets when following more users with Twitter-bot #697

jiriryszawy opened this issue Jun 2, 2021 · 0 comments · May be fixed by #700

Comments

@jiriryszawy
Copy link

When following multiple users on Twitter with Twitter-bot using crontab, the same tweets will be will be importing again and again everytime crontab call the twitter-bot script. Using

*/5 * * * * /usr/local/share/zulip/integrations/twitter/twitter-bot --twitter-name="@TwitterUsername1" --config-file=~/zuliprc
*/5 * * * * /usr/local/share/zulip/integrations/twitter/twitter-bot --twitter-name="@TwitterUsername2" --config-file=~/zuliprc
*/5 * * * * /usr/local/share/zulip/integrations/twitter/twitter-bot --twitter-name="@TwitterUsername3" --config-file=~/zuliprc

will repeat to import last 5 tweets from two TwitterUsernames from the list every five minutes. Only one TwitterUsername will behave as expected and his tweets will not be duplicated.

@strifel proposed this solution:
You could try changing line 114 in /usr/local/share/zulip/integrations/twitter/twitter-bot from

CONFIGFILE_INTERNAL = os.path.expanduser("~/.zulip_twitteruserrc_fetchuser")

to

CONFIGFILE_INTERNAL = os.path.expanduser("~/.zulip_twitteruserrc_fetchuser_" + opts.twitter_name.replace('@', ''))

It solved the problem so I suggest to embed this code to twitter-bot if this don't affect using twitter-bot with only one following TwitterUser.

@timabbott timabbott transferred this issue from zulip/zulip Jun 2, 2021
strifel added a commit to strifel/python-zulip-api that referenced this issue Jun 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant