From 2d59faad8687f5665cd0c8ef5dd8a30ec26959b3 Mon Sep 17 00:00:00 2001 From: FrederikBaerentsen Date: Mon, 16 Sep 2024 17:17:35 +0200 Subject: [PATCH] Added 10s sleep and updated useragent --- CVIssueCount/v2/CVIssueCount.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CVIssueCount/v2/CVIssueCount.py b/CVIssueCount/v2/CVIssueCount.py index 57f64d1..e09f67d 100644 --- a/CVIssueCount/v2/CVIssueCount.py +++ b/CVIssueCount/v2/CVIssueCount.py @@ -206,7 +206,7 @@ def getIssueCount(worker,books): print QUERY data = _read_url(QUERY.encode('utf-8')) - #time.sleep(0) + time.sleep(10) doc = System.Xml.XmlDocument() doc.LoadXml(data) @@ -244,7 +244,7 @@ def _read_url(url): Req = HttpWebRequest.Create(requestUri) Req.Timeout = 60000 - Req.UserAgent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36' + Req.UserAgent = "CVIssueCount/" + " (https://gitea.baerentsen.space/FrederikBaerentsen/ComicRack_Scripts/src/branch/master/CVIssueCount)" Req.AutomaticDecompression = DecompressionMethods.Deflate | DecompressionMethods.GZip #Req.Referer = requestUri