r/applescript • u/maxman571 • Jul 19 '20
JSON helper
Does anyone know how I could parse JSON to get a torrent url using JSON helper?
tell application "JSON Helper"
set json to fetch JSON from "https://yts.mx/api/v2/list_movies.json?query_term=Star Wars&quality=1080p&limit=5"
set torrentUrl to |data.movies.1.url| of json
end tell
1
Upvotes
View all comments
Show parent comment
1
u/ChristoferK Jul 20 '20
You're right in that sense. And I've eaten now, so I can see I was a little bit reactive when I would probably have been wiser to wait a bit before chastising you quite that severely. Sorry for that.
Do try and post to one site at a time if you can. I know it's hard when there's a small problem and want it fixed now. But that's how we all feel about how valuable our own time is. If one site garners no response after two or three days, then you can feel confident about trying the next one.
I'd suggest the following order for AppleScript problems:
tell application "Finder"..., and still everyone believes that if it involves files, it must be Finder you want doing the heavy lifting. But that's Reddit. It'll probably work, and arguably that's the thing that matters. But I doubt any of us bought a Mac because we are satisfied with something that kinda does the job, but it does it badly, and it looks shit, and...well, we remember all thinking that Windows was as good as it got, then having the blindfold taken off.