mirror of
https://github.com/bellingcat/auto-archiver.git
synced 2026-06-11 04:38:29 +03:00
removing useless constructors
This commit is contained in:
@@ -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+)")
|
||||
|
||||
Reference in New Issue
Block a user