From fc9b313832b15bf7c60ea4d0cce109af46eb53eb Mon Sep 17 00:00:00 2001 From: Sam Hadow Date: Fri, 1 Mar 2024 14:59:38 +0100 Subject: [PATCH] wait between scrapping requests, avoid triggering captcha interception --- src/aliexpress.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/aliexpress.py b/src/aliexpress.py index 03187d7..b02cb99 100644 --- a/src/aliexpress.py +++ b/src/aliexpress.py @@ -1,5 +1,5 @@ #!/usr/bin/python -import requests, re, json, os, yaml +import requests, re, json, os, yaml, time from db import * def load_cookies_from_file(file_path): @@ -98,6 +98,7 @@ def update_items(): '''add new history entries for items in database''' in_db = get_item_keys() for item in in_db: + time.sleep(2) new_entry = check_item(item) fill_db(new_entry)