Remove obsolete uppercase_escape function

This function was only necessary with the old ajax format, which
was removed in 4d7bba92eb62518e2273d030235214f4a7605444

Signed-off-by: Jesús <heckyel@hyperbola.info>
This commit is contained in:
James Taylor 2020-12-26 19:35:45 -08:00 committed by Jesús
parent b567a34ecd
commit e1fe6b1d8e
No known key found for this signature in database
GPG Key ID: F6EE7BC59A315766
2 changed files with 2 additions and 8 deletions

View File

@ -47,7 +47,7 @@ headers_1 = (
def playlist_first_page(playlist_id, report_text="Retrieved playlist"): def playlist_first_page(playlist_id, report_text="Retrieved playlist"):
url = 'https://m.youtube.com/playlist?list=' + playlist_id + '&pbj=1' url = 'https://m.youtube.com/playlist?list=' + playlist_id + '&pbj=1'
content = util.fetch_url(url, util.mobile_ua + headers_1, report_text=report_text, debug_name='playlist_first_page') content = util.fetch_url(url, util.mobile_ua + headers_1, report_text=report_text, debug_name='playlist_first_page')
content = json.loads(util.uppercase_escape(content.decode('utf-8'))) content = json.loads(content.decode('utf-8'))
return content return content
@ -68,7 +68,7 @@ def get_videos(playlist_id, page):
url, headers, url, headers,
report_text="Retrieved playlist", debug_name='playlist_videos') report_text="Retrieved playlist", debug_name='playlist_videos')
info = json.loads(util.uppercase_escape(content.decode('utf-8'))) info = json.loads(content.decode('utf-8'))
return info return info

View File

@ -476,12 +476,6 @@ def update_query_string(query_string, items):
return urllib.parse.urlencode(parameters, doseq=True) return urllib.parse.urlencode(parameters, doseq=True)
def uppercase_escape(s):
return re.sub(
r'\\U([0-9a-fA-F]{8})',
lambda m: chr(int(m.group(1), base=16)), s)
def prefix_url(url): def prefix_url(url):
if url is None: if url is None:
return None return None