You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
611 B
Python
24 lines
611 B
Python
import json
|
|
|
|
with open('bunny_data/missing_videos.json', 'r') as f:
|
|
missing_videos = json.load(f)
|
|
|
|
with open('bunny_data/allVideos.json', 'r') as f:
|
|
all_videos = json.load(f)
|
|
|
|
all_videos_guids = {video['guid'] for video in all_videos}
|
|
|
|
for video in missing_videos:
|
|
if video['guid'] in all_videos_guids:
|
|
video['imported'] = True
|
|
|
|
combined_data = {
|
|
"missing_videos": missing_videos,
|
|
"all_videos": all_videos
|
|
}
|
|
|
|
with open('bunny_data/combined_videos.json', 'w') as f:
|
|
json.dump(combined_data, f, indent=4)
|
|
|
|
print("Combined data has been written to bunny_data/combined_videos.json")
|