This commit is contained in:
Tomáš Mládek 2019-04-18 13:12:02 +02:00 committed by Tomáš Mládek
parent 8edcefb7ae
commit d751186594

View file

@ -173,8 +173,8 @@ class DelojzaBot:
message.reply_text("Something is FUCKED: %s" % exc_value)
def handle_url(self, _, update):
urls = map(lambda e: update.message.parse_entity(e),
filter(lambda e: e.type == 'url', update.message.entities))
urls = list(map(lambda e: update.message.parse_entity(e),
filter(lambda e: e.type == 'url', update.message.entities)))
ytdl_urls = [url for url in urls if self.ytdl_can(url)]
normal_urls = [url for url in urls if not self.ytdl_can(url)]
if len(ytdl_urls) > 0: