Skip to content

Commit

Permalink
修改twitcasting获取标题接口
Browse files Browse the repository at this point in the history
  • Loading branch information
auqhjjqdo committed Apr 22, 2023
1 parent 8215d44 commit f7527fe
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,19 +285,11 @@ async def run(self):
}
)).json()
if response['movie']['live']:
movie_id = response['movie']['id']
response = (await self.request(
method='POST',
url='https://twitcasting.tv/happytoken.php',
data={'movie_id': movie_id}
)).json()
token = response['token']
response = (await self.request(
method='GET',
url=f'https://frontendapi.twitcasting.tv/movies/{movie_id}/status/viewer',
params={'token': token}
)).json()
title = response['movie']['title']
url=url
)).text
title = re.search('<meta name="twitter:title" content="(.*?)">', response).group(1)
await self.run_record(url, title)


Expand Down

0 comments on commit f7527fe

Please sign in to comment.