Answer the question
In order to leave comments, you need to log in
How to fix python json decoding?
I get such an error when decoding json format
code where an error pops up
def parseCookie(cookies):
everything = json.loads(cookies)
result = ''
for i in everything:
if i['name'] != 'df_id':
result = result + i['name'] + '=' + i['value'] + '; '
else:
response = requests.get('https://lolz.guru/process-qv9ypsgmv9.js', headers={
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Safari/537.36'}, proxies=PROXYES).text.split(
'[')[1].split(']')[0].replace('\'', '').replace('+', '').split(',')[-1]
df_id = str(base64.b64decode(str(response)))[2:-1]
result = result + i['name'] + '=' + str(df_id) + '; '
return result[:-1]
f = open('cookies.txt', 'r' ,encoding='utf-8')
cookies = parseCookie(f.read())
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question