mirror of
https://github.com/bellingcat/auto-archiver.git
synced 2026-06-12 21:28:29 +03:00
refactor configs
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
from .config import Config
|
from .config import Config
|
||||||
from .wayback_config import WaybackConfig
|
from .selenium_config import SeleniumConfig
|
||||||
from .telethon_config import TelethonConfig
|
from .telethon_config import TelethonConfig
|
||||||
|
from .wayback_config import WaybackConfig
|
||||||
@@ -3,21 +3,15 @@ import argparse, yaml, json
|
|||||||
import gspread
|
import gspread
|
||||||
from loguru import logger
|
from loguru import logger
|
||||||
from selenium import webdriver
|
from selenium import webdriver
|
||||||
from dataclasses import dataclass, asdict
|
from dataclasses import asdict
|
||||||
|
|
||||||
from utils import GWorksheet, getattr_or
|
from utils import GWorksheet, getattr_or
|
||||||
from .wayback_config import WaybackConfig
|
from .wayback_config import WaybackConfig
|
||||||
from .telethon_config import TelethonConfig
|
from .telethon_config import TelethonConfig
|
||||||
|
from .selenium_config import SeleniumConfig
|
||||||
from storages import Storage, S3Config, S3Storage, GDStorage, GDConfig, LocalStorage, LocalConfig
|
from storages import Storage, S3Config, S3Storage, GDStorage, GDConfig, LocalStorage, LocalConfig
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
|
||||||
class SeleniumConfig:
|
|
||||||
timeout_seconds: int = 120
|
|
||||||
window_width: int = 1400
|
|
||||||
window_height: int = 2000
|
|
||||||
|
|
||||||
|
|
||||||
class Config:
|
class Config:
|
||||||
"""
|
"""
|
||||||
Controls the current execution parameters and manages API configurations
|
Controls the current execution parameters and manages API configurations
|
||||||
|
|||||||
8
configs/selenium_config.py
Normal file
8
configs/selenium_config.py
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
from dataclasses import dataclass
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass
|
||||||
|
class SeleniumConfig:
|
||||||
|
timeout_seconds: int = 120
|
||||||
|
window_width: int = 1400
|
||||||
|
window_height: int = 2000
|
||||||
@@ -1,8 +1,9 @@
|
|||||||
|
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class TelethonConfig:
|
class TelethonConfig:
|
||||||
api_id: str
|
api_id: str
|
||||||
api_hash: str
|
api_hash: str
|
||||||
bot_token: str
|
bot_token: str
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
|
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class WaybackConfig:
|
class WaybackConfig:
|
||||||
key: str
|
key: str
|
||||||
secret: str
|
secret: str
|
||||||
|
|||||||
Reference in New Issue
Block a user