The condition for assigning to json_url is the wrong way round: currently for url: aaa.com/xxx we get: aaa.com/xxx&output=json instead of the correct value: aaa.com/xxx?output=json
Example: https://archive.org/details/Cops1922
Calling it was more complex then actually including the type in the video info