Skip to content

Commit

Permalink
fix api header
Browse files Browse the repository at this point in the history
  • Loading branch information
cosven committed Jul 15, 2023
1 parent d824b85 commit d598bcd
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions fuo_kuwo/api.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import logging
import time
from pathlib import Path
from hashlib import md5
from hashlib import md5, sha1

import requests
from requests.cookies import RequestsCookieJar
Expand Down Expand Up @@ -69,8 +69,9 @@ def __init__(self):
self.mobi_headers = {'User-Agent': 'okhttp/3.10.0'}
random_str = '123456789'
self.headers['csrf'] = random_str
self.cookie = {'kw_token': random_str, 'Hm_token': random_str}
self.headers['Cross'] = md5(random_str.encode('utf-8')).hexdigest()
self.cookie = {'Hm_token': random_str}
self.headers['Cross'] = md5(bytes(
sha1(random_str.encode('utf-8')).hexdigest(), 'utf-8')).hexdigest()
self._userid = ''
self._sid = ''
self._cookies = {}
Expand Down

0 comments on commit d598bcd

Please sign in to comment.