mirror of
https://github.com/bellingcat/auto-archiver.git
synced 2026-06-12 21:28:29 +03:00
Minor adjustments
Co-authored-by: Miguel Sozinho Ramalho <19508417+msramalho@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
d3e3eb7639
commit
cd2ae3763f
@@ -150,13 +150,12 @@ class GenericArchiver(Archiver):
|
|||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def get_metatdata_for_post(self, info_extractor: Type[InfoExtractor], url: str, ydl: yt_dlp.YoutubeDL) -> Metadata:
|
def get_metadata_for_post(self, info_extractor: Type[InfoExtractor], url: str, ydl: yt_dlp.YoutubeDL) -> Metadata:
|
||||||
"""
|
"""
|
||||||
Calls into the ytdlp InfoExtract subclass to use the prive _extract_post method to get the post metadata.
|
Calls into the ytdlp InfoExtract subclass to use the prive _extract_post method to get the post metadata.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
ie_instance = info_extractor(downloader=ydl)
|
ie_instance = info_extractor(downloader=ydl)
|
||||||
post_data = None
|
|
||||||
dropin = self.dropin_for_name(info_extractor.ie_key())
|
dropin = self.dropin_for_name(info_extractor.ie_key())
|
||||||
if not dropin:
|
if not dropin:
|
||||||
# TODO: add a proper link to 'how to create your own dropin'
|
# TODO: add a proper link to 'how to create your own dropin'
|
||||||
@@ -274,7 +273,7 @@ class GenericArchiver(Archiver):
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.debug(f'Issue using "{info_extractor.IE_NAME}" extractor to download video (error: {repr(e)}), attempting to use extractor to get post data instead')
|
logger.debug(f'Issue using "{info_extractor.IE_NAME}" extractor to download video (error: {repr(e)}), attempting to use extractor to get post data instead')
|
||||||
try:
|
try:
|
||||||
result = self.get_metatdata_for_post(info_extractor, url, ydl)
|
result = self.get_metadata_for_post(info_extractor, url, ydl)
|
||||||
except (yt_dlp.utils.DownloadError, yt_dlp.utils.ExtractorError) as post_e:
|
except (yt_dlp.utils.DownloadError, yt_dlp.utils.ExtractorError) as post_e:
|
||||||
logger.error(f'Error downloading metadata for post: {post_e}')
|
logger.error(f'Error downloading metadata for post: {post_e}')
|
||||||
return False
|
return False
|
||||||
|
|||||||
Reference in New Issue
Block a user