mirror of
https://github.com/bellingcat/auto-archiver.git
synced 2026-06-13 13:48:28 +03:00
removing useless constructors
This commit is contained in:
@@ -11,9 +11,6 @@ from storages import Storage
|
|||||||
class TelegramArchiver(Archiver):
|
class TelegramArchiver(Archiver):
|
||||||
name = "telegram"
|
name = "telegram"
|
||||||
|
|
||||||
def __init__(self, storage: Storage, driver):
|
|
||||||
super().__init__(storage, driver)
|
|
||||||
|
|
||||||
def download(self, url, check_if_exists=False):
|
def download(self, url, check_if_exists=False):
|
||||||
# detect URLs that we definitely cannot handle
|
# detect URLs that we definitely cannot handle
|
||||||
if 't.me' != self.get_netloc(url):
|
if 't.me' != self.get_netloc(url):
|
||||||
|
|||||||
@@ -15,9 +15,6 @@ class TiktokArchiver(Archiver):
|
|||||||
|
|
||||||
status = 'success'
|
status = 'success'
|
||||||
|
|
||||||
def __init__(self, storage: Storage, driver):
|
|
||||||
super().__init__(storage, driver)
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
info = tiktok_downloader.info_post(url)
|
info = tiktok_downloader.info_post(url)
|
||||||
key = self.get_key(f'{info.id}.mp4')
|
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 .base_archiver import Archiver, ArchiveResult
|
||||||
|
|
||||||
from storages import Storage
|
|
||||||
|
|
||||||
class TwitterArchiver(Archiver):
|
class TwitterArchiver(Archiver):
|
||||||
"""
|
"""
|
||||||
This Twitter Archiver uses unofficial scraping methods, and it works as
|
This Twitter Archiver uses unofficial scraping methods, and it works as
|
||||||
an alternative to TwitterApiArchiver when no API credentials are provided.
|
an alternative to TwitterApiArchiver when no API credentials are provided.
|
||||||
"""
|
"""
|
||||||
def __init__(self, storage: Storage, driver):
|
|
||||||
super().__init__(storage, driver)
|
|
||||||
|
|
||||||
name = "twitter"
|
name = "twitter"
|
||||||
link_pattern = re.compile(r"twitter.com\/(?:\#!\/)?(\w+)\/status(?:es)?\/(\d+)")
|
link_pattern = re.compile(r"twitter.com\/(?:\#!\/)?(\w+)\/status(?:es)?\/(\d+)")
|
||||||
|
|||||||
Reference in New Issue
Block a user