Skip to content

Commit

Permalink
修复Pandalive多直播录制花屏和挤号
Browse files Browse the repository at this point in the history
  • Loading branch information
auqhjjqdo committed Jan 11, 2024
1 parent c07d5d1 commit 871ba10
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions live_recorder.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 426,7 @@ async def run(self):
method='POST',
url='https://api.pandalive.co.kr/v1/live/play',
headers={
'x-device-info': '{"t":"webPc","v":"1.0","ui":0}'
'x-device-info': '{"t":"webMobile","v":"1.0","ui":0}'
},
data={
'action': 'watch',
Expand All @@ -435,11 435,7 @@ async def run(self):
)).json()
if response['result']:
title = response['media']['title']
streams = HLSStream.parse_variant_playlist(
self.get_streamlink(),
response['PlayList']['hls'][0]['url']
)
stream = list(streams.values())[0] # HLSStream[mpegts]
stream = self.get_streamlink().streams(url).get('best') # HLSStream[mpegts]
await asyncio.to_thread(self.run_record, stream, url, title, 'ts')


Expand Down

0 comments on commit 871ba10

Please sign in to comment.