From 18bae80a1da0875fd04035a6f62ecdb1c50f4fc3 Mon Sep 17 00:00:00 2001 From: Myned Date: Fri, 27 Oct 2017 21:31:57 -0400 Subject: [PATCH] Lowered rate for iqdb requests to reduce possibility of ip ban --- src/main/utils/scraper.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/utils/scraper.py b/src/main/utils/scraper.py index 32ec51c..b1ab3a7 100644 --- a/src/main/utils/scraper.py +++ b/src/main/utils/scraper.py @@ -1,3 +1,4 @@ +import asyncio import re from bs4 import BeautifulSoup @@ -8,6 +9,8 @@ from utils import utils as u async def get_post(url): + await asyncio.sleep(u.RATE_LIMIT) + content = await u.fetch('http://iqdb.harry.lu', params={'url': url}) try: