Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
[vlive] UnicodeEndodeError on Hangul URLs #9352
Comments
|
In general URLs should be corrected encoded:
When I copy the URL from Firefox, it's automatically escaped by Firefox. How did you get the URL? |
|
(Ironically that's my code, but not sure how to fix it best.
|
|
As of RFC 2616 default charset value is ISO-8859-1 (latin-1). Thus for now you should either pass bytestrings directly (as you suggested) or pass latin-1 encodable strings. |
|
Could you apply this fix then? diff --git a/youtube_dl/extractor/vlive.py b/youtube_dl/extractor/vlive.py
index 7f9e99e..a672ea9 100644
--- a/youtube_dl/extractor/vlive.py
+++ b/youtube_dl/extractor/vlive.py
@@ -43,7 +43,7 @@ class VLiveIE(InfoExtractor):
status_params = self._download_json(
'http://www.vlive.tv/video/status?videoSeq=%s' % video_id,
video_id, 'Downloading JSON status',
- headers={'Referer': url})
+ headers={'Referer': url.encode('utf-8')})
status = status_params.get('status')
air_start = status_params.get('onAirStartAt', '')
is_live = status_params.get('isLive')Too small for PR. |
What is the purpose of your issue?
If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows: