Package: twitterwatch Version: 0.1-2 Severity: grave Tag: patch X-Debbugs-Cc: Boyuan Yang <[email protected]>
Dear maintainer, twitterwatch has become unusable with the new python3-tweepy package because of backwards-incompatible API changes in version 4. Attached is an (untested) patch that should make the package work again. Cheers Timo PS. You may also want to update d/watch to point to the new upstream repository at https://gitlab.com/chaica/twitterwatch -- ⢀⣴⠾⠻⢶⣦⠀ ╭────────────────────────────────────────────────────╮ ⣾⠁⢠⠒⠀⣿⡁ │ Timo Röhling │ ⢿⡄⠘⠷⠚⠋⠀ │ 9B03 EBB9 8300 DF97 C2B1 23BF CC8C 6BDD 1403 F4CA │ ⠈⠳⣄⠀⠀⠀⠀ ╰────────────────────────────────────────────────────╯
diff --git a/twitterwatch/main.py b/twitterwatch/main.py
index f7a481b..e811e6f 100644
--- a/twitterwatch/main.py
+++ b/twitterwatch/main.py
@@ -43,7 +43,8 @@ class Main(object):
self.auth.secure = True
self.auth.set_access_token(self.cfgvalues['access_token'],
self.cfgvalues['access_token_secret'])
- self.api = tweepy.API(self.auth, wait_on_rate_limit=True, wait_on_rate_limit_notify=True)
+ self.api = tweepy.API(self.auth, wait_on_rate_limit=True)
+ self.me = self.api.verify_credentials()
self.main()
def main(self):
@@ -59,7 +60,7 @@ class Main(object):
# get the interval between two checks
pause = datetime.timedelta(minutes=self.cfgvalues['check_interval'])
if (currentdate - pause) > lastactiondate:
- user = self.api.me().screen_name
+ user = self.me.screen_name
# warn
warning = 'Twitter stream of {} has stopped since {}'.format(user, lastactiondate.strftime("%d/%m/%Y - %H:%M:%S"))
emailwarn = EmailWarning(self.cfgvalues, warning, user)
signature.asc
Description: PGP signature

