Added 10s sleep and updated useragent

This commit is contained in:
FrederikBaerentsen 2024-09-16 17:17:35 +02:00
parent 35e770084a
commit 2d59faad86

View File

@ -206,7 +206,7 @@ def getIssueCount(worker,books):
print QUERY print QUERY
data = _read_url(QUERY.encode('utf-8')) data = _read_url(QUERY.encode('utf-8'))
#time.sleep(0) time.sleep(10)
doc = System.Xml.XmlDocument() doc = System.Xml.XmlDocument()
doc.LoadXml(data) doc.LoadXml(data)
@ -244,7 +244,7 @@ def _read_url(url):
Req = HttpWebRequest.Create(requestUri) Req = HttpWebRequest.Create(requestUri)
Req.Timeout = 60000 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.AutomaticDecompression = DecompressionMethods.Deflate | DecompressionMethods.GZip
#Req.Referer = requestUri #Req.Referer = requestUri