【问题标题】:Is it possible to multiple phrases to this .py?是否可以对这个 .py 使用多个短语?
【发布时间】:2017-04-10 18:49:57
【问题描述】:

Bot.py(我正在使用的那个)

#!/usr/bin/env python

from TwitterFollowBot import TwitterBot
my_bot = TwitterBot("/Home/TwitterFollowBot/config.txt")  
my_bot.sync_follows()
my_bot.auto_rt("@ShoutGamers", count=2200)

因此,我正在使用 thisTwitterFollowBot 机器人自动转发任何包含“@ShoutGamers”的推文。

默认.py

from TwitterFollowBot import TwitterBot
my_bot = TwitterBot()
my_bot.auto_fav("phrase", count=1000)

我想知道如何在其中添加多个短语? 我需要在@ShoutGamers 和@RtwtKing 中添加这两个短语。

【问题讨论】:

    标签: python twitter bots


    【解决方案1】:

    就像添加两个字符串一样简单。

    如果您想在一条推文中自动转发同时包含 @ShoutGamers@RtwtKing 的推文,您可以:

    my_bot.auto_rt("@ShoutGamers @RtwtKing", count=2200)
    

    如果你想自动转发 @ShoutGamers@RtwtKing 不在一起的推文,你可以使用 bot.auto_rt() 两次:

    my_bot.auto_rt("@ShoutGamers", count=2200)
    my_bot.auto_rt("@RtwtKing", count=2200)
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-10-16
      • 1970-01-01
      • 2017-03-10
      • 2020-03-02
      • 2022-01-08
      • 2020-08-03
      • 2010-09-29
      相关资源
      最近更新 更多