kopia lustrzana https://github.com/bellingcat/auto-archiver
removing useless constructors
rodzic
9317b5e035
commit
e180b82b0d
|
@ -11,9 +11,6 @@ from storages import Storage
|
|||
class TelegramArchiver(Archiver):
|
||||
name = "telegram"
|
||||
|
||||
def __init__(self, storage: Storage, driver):
|
||||
super().__init__(storage, driver)
|
||||
|
||||
def download(self, url, check_if_exists=False):
|
||||
# detect URLs that we definitely cannot handle
|
||||
if 't.me' != self.get_netloc(url):
|
||||
|
|
|
@ -15,9 +15,6 @@ class TiktokArchiver(Archiver):
|
|||
|
||||
status = 'success'
|
||||
|
||||
def __init__(self, storage: Storage, driver):
|
||||
super().__init__(storage, driver)
|
||||
|
||||
try:
|
||||
info = tiktok_downloader.info_post(url)
|
||||
key = self.get_key(f'{info.id}.mp4')
|
||||
|
|
|
@ -5,15 +5,11 @@ from snscrape.modules.twitter import TwitterTweetScraper, Video, Gif, Photo
|
|||
|
||||
from .base_archiver import Archiver, ArchiveResult
|
||||
|
||||
from storages import Storage
|
||||
|
||||
class TwitterArchiver(Archiver):
|
||||
"""
|
||||
This Twitter Archiver uses unofficial scraping methods, and it works as
|
||||
an alternative to TwitterApiArchiver when no API credentials are provided.
|
||||
"""
|
||||
def __init__(self, storage: Storage, driver):
|
||||
super().__init__(storage, driver)
|
||||
|
||||
name = "twitter"
|
||||
link_pattern = re.compile(r"twitter.com\/(?:\#!\/)?(\w+)\/status(?:es)?\/(\d+)")
|
||||
|
|
Ładowanie…
Reference in New Issue