From 81c2f20b5386d89a62dc27293654d75b77f47473 Mon Sep 17 00:00:00 2001 From: Philipp Hagemeister Date: Sun, 9 Feb 2014 17:56:10 +0100 Subject: [youtube] Correct invalid JSON (Fixes #2353) --- youtube_dl/utils.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'youtube_dl/utils.py') diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py index 01c8c017d..fa8f80e02 100644 --- a/youtube_dl/utils.py +++ b/youtube_dl/utils.py @@ -1214,3 +1214,9 @@ class PagedList(object): if end == nextfirstid: break return res + + +def uppercase_escape(s): + return re.sub( + r'\\U([0-9a-fA-F]{8})', + lambda m: compat_chr(int(m.group(1), base=16)), s) -- cgit v1.2.3