kopia lustrzana https://github.com/bellingcat/auto-archiver
minor code cleanup
rodzic
0304860bce
commit
3b9b42b854
|
@ -6,5 +6,5 @@ service_account.json
|
|||
__pycache__/
|
||||
._*
|
||||
anu.html
|
||||
geckodriver.log
|
||||
|
||||
*.log
|
||||
.pytest_cach
|
|
@ -6,7 +6,6 @@ from dataclasses import dataclass
|
|||
from abc import ABC, abstractmethod
|
||||
from urllib.parse import urlparse
|
||||
import hashlib
|
||||
from selenium.common.exceptions import TimeoutException
|
||||
from loguru import logger
|
||||
import time
|
||||
import requests
|
||||
|
|
|
@ -39,7 +39,7 @@ class TelegramArchiver(Archiver):
|
|||
|
||||
images = []
|
||||
for im in image_tags:
|
||||
urls = [u.replace("'", "") for u in re.findall('url\((.*?)\)', im['style'])]
|
||||
urls = [u.replace("'", "") for u in re.findall(r'url\((.*?)\)', im['style'])]
|
||||
images += urls
|
||||
|
||||
page_cdn, page_hash, thumbnail = self.generate_media_page(images, url, html.escape(str(t.content)))
|
||||
|
|
|
@ -6,10 +6,10 @@ class Storage(ABC):
|
|||
def __init__(self, config): pass
|
||||
|
||||
@abstractmethod
|
||||
def get_cdn_url(self, path): pass
|
||||
def get_cdn_url(self, key): pass
|
||||
|
||||
@abstractmethod
|
||||
def exists(self, path): pass
|
||||
def exists(self, key): pass
|
||||
|
||||
@abstractmethod
|
||||
def uploadf(self, file, key, **kwargs): pass
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
# we need to explicitly expose the available imports here
|
||||
from .gworksheet import GWorksheet
|
||||
from .gworksheet import *
|
||||
from .misc import *
|
Ładowanie…
Reference in New Issue