minor code cleanup

pull/20/head
msramalho 2022-03-15 11:32:39 +01:00
rodzic 0304860bce
commit 3b9b42b854
5 zmienionych plików z 6 dodań i 7 usunięć

4
.gitignore vendored
Wyświetl plik

@ -6,5 +6,5 @@ service_account.json
__pycache__/
._*
anu.html
geckodriver.log
*.log
.pytest_cach

Wyświetl plik

@ -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

Wyświetl plik

@ -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)))

Wyświetl plik

@ -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

Wyświetl plik

@ -1,3 +1,3 @@
# we need to explicitly expose the available imports here
from .gworksheet import GWorksheet
from .gworksheet import *
from .misc import *