feat: Enhance scraper timing configuration with user-defined settings and UI adjustments

This commit is contained in:
Louis Mylle
2026-01-10 17:36:09 +01:00
parent 3248060317
commit 610a20d12d
5 changed files with 422 additions and 67 deletions

View File

@@ -58,7 +58,7 @@ class ScraperThread(QThread):
comic_batch_break = pyqtSignal(float, int) # duration, comics_processed
download_delay = pyqtSignal(float, int) # duration, remaining_downloads
def __init__(self, username, password, start_page, end_page, scraping_mode=0, headless=True):
def __init__(self, username, password, start_page, end_page, scraping_mode=0, headless=True, timing_config=None):
"""
Initialize the scraper thread.
@@ -69,6 +69,7 @@ class ScraperThread(QThread):
end_page (int): Ending page number
scraping_mode (int): Scraping mode (0=All Comics, 1=Latest Comics)
headless (bool): Whether to run Chrome in headless mode
timing_config (dict): Timing configuration settings
"""
super().__init__()
self.username = username
@@ -77,6 +78,7 @@ class ScraperThread(QThread):
self.end_page = end_page
self.scraping_mode = scraping_mode
self.headless = headless
self.timing_config = timing_config
self.scraper = None
self._is_running = False
@@ -92,7 +94,8 @@ class ScraperThread(QThread):
self.scraper = Scraper(
headless=self.headless,
progress_callback=self._handle_scraper_progress,
scraping_mode=self.scraping_mode
scraping_mode=self.scraping_mode,
timing_config=self.timing_config
)
# Perform login