home · contact · privacy
Improve mobile twitter URL pattern matching.
[plomlombot-irc.git] / plomlombot.py
index a1ef7f8c3e2b60f9a61a4c2db1e8485e1b5ec5ae..e1ec06a4abf82f51a6a60a3a70c3673fe5bf53c5 100755 (executable)
@@ -114,7 +114,8 @@ def lineparser_loop(io, nickname):
 
                 def mobile_twitter_hack(url):
                     re1 = 'https?://(mobile.twitter.com/)[^/]+(/status/)'
 
                 def mobile_twitter_hack(url):
                     re1 = 'https?://(mobile.twitter.com/)[^/]+(/status/)'
-                    re2 = 'https?://mobile.twitter.com/([^/]+)/status/([^\?]+)'
+                    re2 = 'https?://mobile.twitter.com/([^/]+)/status/' \
+                        + '([^\?/]+)'
                     m = re.search(re1, url)
                     if m and m.group(1) == 'mobile.twitter.com/' \
                             and m.group(2) == '/status/':
                     m = re.search(re1, url)
                     if m and m.group(1) == 'mobile.twitter.com/' \
                             and m.group(2) == '/status/':