0

So I've got a bunch of JSON files that I'm trying to parse. Here's an excerpt from one of the files I'm working on: https://pastebin.com/MQiQyvXH

Pretty much what I'm trying to do is select all of the text between: "FileList":[{"Path": and "Size" (which happens hundreds of times throughout the file), and output that to a text file. I tried to do something in Python, but couldn't get it to work. So for the example I gave, I want La.317eme.Section.1965.DVDRip.x264-YOYO.mkv in a text file. I have a list of about a thousand JSON responses with about 200 releases with -YOYO.mkv, and I'm trying to get a list of all of the -YOYO.mkv releases from the list. Thanks!

1 Answers1

1

Perhaps the most obvious way would be to use a Python library that parses JSON.

I'm not a Python programmer, but I imagine that such a thing must exist. If you can't do that, and if you're sure that the JSON responses ALWAYS look like this, and if you're willing to tolerate some false positives and false negatives, you could probably get away with a regex. Again, not sure about the Python regex syntax, but something like this:

"FileList":\[\{"Path":"(.*?)","Size"

That should capture the bits that you want.