Fix trollvid

master
AbdullahM0hamed 2021-03-25 14:00:39 +00:00
parent 493d68e312
commit 44f2002aaa
1 changed files with 4 additions and 3 deletions

View File

@ -26,16 +26,17 @@ class Trollvid(BaseExtractor):
elif token:
token = token.group(1)
trollvid_id = self.url.split('/')[-1] # something like: 084df78d215a
# something like: 084df78d215a
trollvid_id = self.url.split('/')[-1]
post = helpers.post(f'https://mp4.sh/v/{trollvid_id}',
data={'token': token},
referer=self.url,
).json()
# {'success':True} on success.
if post.get('success') and post.get('data'):
if post.get('success') and post.get('file'):
return {
'stream_url': post['data']
'stream_url': post['file']
}
# In case neither methods work.