From ed4b193ae7209f723f774f0d78b89c3e87d289eb Mon Sep 17 00:00:00 2001 From: msramalho <19508417+msramalho@users.noreply.github.com> Date: Wed, 15 Jun 2022 22:30:08 +0200 Subject: [PATCH] walrus --- archivers/vk_archiver.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/archivers/vk_archiver.py b/archivers/vk_archiver.py index e37c7a5..d62a2a5 100644 --- a/archivers/vk_archiver.py +++ b/archivers/vk_archiver.py @@ -27,13 +27,11 @@ class VkArchiver(Archiver): def download(self, url, check_if_exists=False): # detect URLs that this archiver can handle - has_wall = self.wall_pattern.search(url) - has_photo = self.photo_pattern.search(url) _id, method = None, None - if has_wall: + if has_wall := self.wall_pattern.search(url): _id = has_wall[0] method = self.archive_wall - elif has_photo: + elif has_photo := self.photo_pattern.search(url): _id = has_photo[0] method = self.archive_photo else: return False