I am trying to get captions from youtube's API in roblox but it gives me XML code instead of JSON. I'm trying to use string patterns but it wont work.
Here is the code I'm testing with:
for caption in string.gmatch(text, [[<text start=.*</text]]) do print(caption) end
If you want the XML code, here is a small part of it
<transcript> <text start="0.08" dur="5.29">About two years ago we attempted to make our way through super mario 3D world while permanently</text> <text start="5.37" dur="3.729">crouching, and the run actually ended up being a ton of fun.</text> <text start="9.099" dur="4.431">Naturally I thought it might be fun to try to make it through Bowser's Fury, using the</text> <text start="13.53" dur="11.55">exact same ruleset we used for 3D world only to quickly find out.</text> <text start="25.08" dur="3.22">Yes, the game can be beaten like this indeed.</text> <text start="28.3" dur="3.01">It’s actually surprisingly simple.</text> <text start="31.31" dur="3.69">So I hope you enjoyed this little video, if you did, don't forget to leave me a thumbs</text> <text start="35" dur="1">up and maybe …</text> <text start="36" dur="3.89">FC: Yeah that’s obviously not what we are going to do today.</text>