mirror of
https://github.com/R0m1k3/Priceflow.git
synced 2026-10-23 07:08:12 +02:00
feat: Introduce BrowserlessService for persistent web scraping with enhanced Amazon price extraction, alongside initial scheduler service and task tracking.
This commit is contained in:
1 parent
3bbab058c6
commit
8a8ef02168
3 files changed
+20
-3
No files matched your search
@@ -541,10 +541,10 @@ class BrowserlessService:
|
||||
# Take screenshot
|
||||
screenshot_path = ""
|
||||
try:
|
||||
os.makedirs("/app/screenshots", exist_ok=True)
|
||||
os.makedirs("screenshots", exist_ok=True)
|
||||
timestamp = int(time.time() * 1000)
|
||||
safe_name = "".join(c if c.isalnum() else "_" for c in url.split("//")[-1])[:50]
|
||||
screenshot_path = f"/app/screenshots/{safe_name}_{timestamp}.jpg"
|
||||
screenshot_path = f"screenshots/{safe_name}_{timestamp}.jpg"
|
||||
|
||||
is_amazon = "amazon" in url.lower() and "/dp/" in url
|
||||
|
||||
|
||||
Reference in new issue
Block a user