remove some bulky and useless data from mock gen

Co-authored-by: Samantaz Fox <coding@samantaz.fr>
pull/2/head
Lennart Bernhardt 2023-04-07 22:08:37 +00:00 zatwierdzone przez GitHub
rodzic 177f0ca96c
commit 767f4c0634
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 7 dodań i 0 usunięć

Wyświetl plik

@ -71,7 +71,14 @@ for file in files:
default_context.update({"videoId": file["video_id"]})
context = json.dumps(default_context)
video = json.loads(run_yt_helper_script("-c", "web", "-e", file['endpoint'], "--data", context))
# Delete some useless elements
del video['responseContext']
if 'topbar' in video: del video['topbar']
if 'overlay' in video: del video['overlay']
if 'attestation' in video: del video['attestation']
if 'frameworkUpdates' in video: del video['frameworkUpdates']
processed_mocks = apply_ip_replacements(json.dumps(video, indent=2))
write_string_to_file("video/"+file["name"], processed_mocks)