Updated user agent
This commit is contained in:
parent
5366e9992d
commit
f56a553861
@ -43,6 +43,7 @@
|
||||
import requests
|
||||
import sys
|
||||
import os
|
||||
import io
|
||||
import re
|
||||
from datetime import date,datetime
|
||||
|
||||
@ -108,7 +109,7 @@ for line in comiclist:
|
||||
comiclist.close()
|
||||
|
||||
print("py: Querying ComicVine for new issues")
|
||||
headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36'}
|
||||
headers = {'User-Agent': 'CVIssueCount/ (https://gitea.baerentsen.space/FrederikBaerentsen/ComicRack_Scripts/src/branch/master/CVIssueCount)'}
|
||||
new_comics_cont = 0
|
||||
old_comics_cont = 0
|
||||
updated_comics_cont = 0
|
||||
@ -205,8 +206,8 @@ deleted_file.close()
|
||||
|
||||
print("py: Writing database to file")
|
||||
|
||||
outfile = open(out_file,"wb")
|
||||
outfile.write(("Missing;" + end_date + "\n").encode())
|
||||
outfile = io.open(out_file,"w",encoding="utf8")
|
||||
outfile.write(("Missing;" + end_date + "\n"))
|
||||
|
||||
for volume_id in sorted(comics):
|
||||
issues = ""
|
||||
@ -215,7 +216,7 @@ for volume_id in sorted(comics):
|
||||
issues += str(issue_id) + ","
|
||||
nums += comics[volume_id][issue_id] + ","
|
||||
issues = issues[:-1]
|
||||
outfile.write((str(volume_id) + ";" + issues + ";" + nums + "\n").encode())
|
||||
outfile.write((str(volume_id) + ";" + issues + ";" + nums + "\n"))
|
||||
|
||||
outfile.close()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user