mirror of
https://github.com/bellingcat/auto-archiver.git
synced 2026-06-12 21:28:29 +03:00
Add hash and screenshot methods; switch to more recent ytdl fork
This commit is contained in:
@@ -8,8 +8,8 @@ from .base_archiver import Archiver, ArchiveResult
|
||||
class WaybackArchiver(Archiver):
|
||||
name = "wayback"
|
||||
|
||||
def __init__(self, storage: Storage):
|
||||
super(WaybackArchiver, self).__init__(storage)
|
||||
def __init__(self, storage: Storage, driver):
|
||||
super(WaybackArchiver, self).__init__(storage, driver)
|
||||
self.seen_urls = {}
|
||||
|
||||
def download(self, url, check_if_exists=False):
|
||||
@@ -71,6 +71,7 @@ class WaybackArchiver(Archiver):
|
||||
except:
|
||||
title = "Could not get title"
|
||||
|
||||
result = ArchiveResult(status='Internet Archive fallback', cdn_url=archive_url, title=title)
|
||||
screenshot = self.get_screenshot(url)
|
||||
result = ArchiveResult(status='Internet Archive fallback', cdn_url=archive_url, title=title, screenshot=screenshot)
|
||||
self.seen_urls[url] = result
|
||||
return result
|
||||
|
||||
Reference in New Issue
Block a user