X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~matthewv/git?a=blobdiff_plain;f=commands.py;h=512b4f7e3a0a634741ffd21ec955cfb642e7d311;hb=532656ca33d5309407b1c7c003a666dc0788258b;hp=721089d3912d6e86d466c2be1d65edbf3253f7e9;hpb=5b81b760d26e6ded7f49acfe88964e7cdf7162d4;p=irc.git diff --git a/commands.py b/commands.py index 721089d..512b4f7 100755 --- a/commands.py +++ b/commands.py @@ -571,12 +571,11 @@ def getTweet(urlstring,twitapi,inclusion=False,recurlvl=0): tweeter_name = tweeter_name + " RTing " + status.user.name #.encode('UTF-8', 'replace') tweetText = status.full_text if status.media: - replacements = defaultdict( list ) + replacements = defaultdict(list) for medium in status.media: replacements[medium.url].append(medium.media_url_https) for k,v in replacements.items(): - v = [re.sub(r"/tweet_video_thumb/([\w\-]+).jpg", r"/tweet_video/\1.mp4", link) for link in v] if len(v) > 1: replacementstring = "[" + " ; ".join(v) +"]"