feat: Enhance scraper timing configuration with user-defined settings and UI adjustments
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user