mirror of
https://github.com/iv-org/mocks.git
synced 2024-11-26 23:50:48 +00:00
remove some bulky and useless data from mock gen
Co-authored-by: Samantaz Fox <coding@samantaz.fr>
This commit is contained in:
parent
177f0ca96c
commit
767f4c0634
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user