Skip to content

Commit

Permalink
[common] use quoted video_host and video_url as well
Browse files Browse the repository at this point in the history
  • Loading branch information
soimort committed Apr 25, 2018
1 parent ff6deaf commit 4496067
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/you_get/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -1583,6 +1583,8 @@ def url_to_module(url):

# all non-ASCII code points must be quoted (percent-encoded UTF-8)
url = ''.join([ch if ord(ch) in range(128) else parse.quote(ch) for ch in url])
video_host = r1(r'https?://([^/]+)/', url)
video_url = r1(r'https?://[^/]+(.*)', url)

k = r1(r'([^.]+)', domain)
if k in SITES:
Expand Down

0 comments on commit 4496067

Please sign in to comment.