minor code cleanup

This commit is contained in:
msramalho
2022-03-15 11:32:39 +01:00
parent 0304860bce
commit 3b9b42b854
5 changed files with 6 additions and 7 deletions

4
.gitignore vendored
View File

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

View File

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

View File

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

View File

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

View File

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