Skip to content

Commit

Permalink
Unencode urls for printing (#553)
Browse files Browse the repository at this point in the history
* Unencode urls for printing

* get magnet links as provided by provider
  • Loading branch information
AbdullahM0hamed committed Oct 12, 2020
1 parent d950dd6 commit eadf54e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions anime_downloader/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from tabulate import tabulate
from uuid import uuid4
from secrets import choice
from urllib.parse import urlparse
from urllib.parse import urlparse, unquote

from anime_downloader import session
from anime_downloader.sites import get_anime_class, helpers
Expand Down Expand Up @@ -207,7 +207,8 @@ def print_episodeurl(episode):
# print(episode.source().stream_url + "?referer=" + episode.source().referer)
# else:
# Currently I don't know of a way to specify referer in url itself so leaving it here.
print(episode.source().stream_url)
url = episode.url if episode.url.startswith("magnet") else episode.source().stream_url
print(unquote(url))


def play_episode(episode, *, player, title):
Expand Down

0 comments on commit eadf54e

Please sign in to comment.