Untitled

 avatar
unknown
plain_text
12 days ago
781 B
4
Indexable
if normalized_link not in existing_links: 
    write_to_txt_file(normalized_link, config.FILE_PATH)
    first_unique_saved = True
    log_step("✅ New unique link saved.")
    repeat_check = False
else:
    log_step("Duplicate found in file.")
    if not repeat_check:
        log_step("⚠️ First duplicate seen. Saving and verifying again...")
        previous_clipboard_link = normalized_link
        repeat_check = True
        swipe_to_next_video(driver)
        continue
    elif normalized_link == previous_clipboard_link:
        log_step("🛑 Confirmed same duplicate twice. Exiting scraper.")
        break
    else:
        log_step("⚠️ Different duplicate. Resetting repeat check.")
        previous_clipboard_link = normalized_link
        repeat_check = True
Editor is loading...
Leave a Comment