User agent

master
Bob Mottram 2019-08-26 14:38:26 +01:00
parent e07d5cfcb4
commit dac9f1f5f8
1 changed files with 1 additions and 1 deletions

View File

@ -34,7 +34,7 @@ def getJson(session,url: str,headers: {},params: {}, \
if params: if params:
sessionParams=params sessionParams=params
pythonVersion=str(sys.version_info[0])+'.'+str(sys.version_info[1])+'.'+str(sys.version_info[2]) pythonVersion=str(sys.version_info[0])+'.'+str(sys.version_info[1])+'.'+str(sys.version_info[2])
sessionHeaders['User-Agent']='http.py/'+pythonVersion+' (Epicyon/'+version+'; +'+httpPrefix+'://'+domain+'/)' sessionHeaders['User-Agent']='Epicyon/'+version+'; +'+httpPrefix+'://'+domain+'/'
#"Mozilla/5.0 (Linux; Android 5.1.1; Nexus 5)" #"Mozilla/5.0 (Linux; Android 5.1.1; Nexus 5)"
if not session: if not session:
print('WARN: no session specified for getJson') print('WARN: no session specified for getJson')