Skip to content

Commit 2917d26

Browse files
authored
Update chaoxing.py
1 parent 5fd71db commit 2917d26

1 file changed

Lines changed: 11 additions & 6 deletions

File tree

api/chaoxing.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -197,21 +197,26 @@ def main_pass_video(self, personid, dtoken, otherInfo, playingTime, clazzId, dur
197197
# print(url)
198198
params = {
199199
'otherInfo': otherInfo,
200-
'playingTime': playingTime,
201-
'duration': duration,
200+
'playingTime': str(playingTime),
201+
'duration': str(duration),
202202
# 'akid': None,
203203
'jobid': jobid,
204204
'clipTime': '0_{}'.format(duration),
205-
'clazzId': clazzId,
205+
'clazzId': str(clazzId),
206206
'objectId': objectId,
207207
'userid': userid,
208-
'isdrag': 0,
208+
'isdrag': '0',
209209
'enc': self.get_enc(clazzId, jobid, objectId, playingTime, duration, userid),
210210
'rt': '0.9', # 'rt': '1.0', ??
211211
'dtype': 'Video',
212-
'view': 'json',
213-
'_t': _tsp
212+
'view': 'pc',
213+
'_t': str(int(round( time.time()*1000)))
214214
}
215+
mylist = []
216+
for key in params.items():
217+
my = "=".join(key)
218+
mylist.append(my)
219+
params = "&".join(mylist)
215220
# print:(url+params)
216221
return self.session.get(url, params=params).json()
217222

0 commit comments

Comments
 (0)