Skip to content

Commit

Permalink
Merge pull request #654 from AbdullahM0hamed/trollvid
Browse files Browse the repository at this point in the history
Fix trollvid
  • Loading branch information
AbdullahM0hamed committed Mar 25, 2021
2 parents 493d68e + 44f2002 commit e8604f4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions anime_downloader/extractors/trollvid.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,17 @@ def _get_data(self):

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.
Expand Down

0 comments on commit e8604f4

Please sign in to comment.