From bd235347ac905147582b70f68253e88b4ea9bd86 Mon Sep 17 00:00:00 2001 From: Dave Mateer Date: Mon, 9 May 2022 11:23:42 +0100 Subject: [PATCH] Added catch in youtubedl_archiver for twitter.com to see if a linked video is in there eg vk.com --- archivers/youtubedl_archiver.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/archivers/youtubedl_archiver.py b/archivers/youtubedl_archiver.py index 6e626b5..1ea194c 100644 --- a/archivers/youtubedl_archiver.py +++ b/archivers/youtubedl_archiver.py @@ -30,6 +30,13 @@ class YoutubeDLArchiver(Archiver): if info.get('is_live', False): logger.warning("Live streaming media, not archiving now") return ArchiveResult(status="Streaming media") + if 'twitter.com' in netloc: + if 'https://twitter.com/' in info['webpage_url']: + logger.info('Found https://twitter.com/ in the download url from Twitter') + else: + logger.info('Found a linked video probably in a link in a tweet - not getting that video as there may be images in the tweet') + return False + if check_if_exists: if 'entries' in info: