diff options
| -rw-r--r-- | kcc/KCC_gui.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/kcc/KCC_gui.py b/kcc/KCC_gui.py index d37aa25..8d403f0 100644 --- a/kcc/KCC_gui.py +++ b/kcc/KCC_gui.py @@ -246,8 +246,8 @@ class VersionThread(QtCore.QThread): def run(self): try: - XML = urlopen('https://kcc.iosphe.re/Version/') - XML = parse(XML) + XML = parse(urlopen(Request('https://kcc.iosphe.re/Version/', + headers={'User-Agent': 'KindleComicConverter/' + __version__}))) except Exception: return latestVersion = XML.childNodes[0].getElementsByTagName('LatestVersion')[0].childNodes[0].toxml() @@ -950,7 +950,8 @@ class KCCGUI(KCC_ui.Ui_KCC): text = doc.createTextNode(message) main.appendChild(text) urlopen(Request(url='https://kcc.iosphe.re/ErrorHandle/', data=doc.toxml(encoding='utf-8'), - headers={'Content-Type': 'application/xml'})) + headers={'Content-Type': 'application/xml', + 'User-Agent': 'KindleComicConverter/' + __version__})) except: pass elif kind == 'question': |