json interpreter? #223
Replies: 11 comments 6 replies
-
Yeah I've seen this too. Until know I was too lazy to implement this in goskyr because it was always possible to extract the same information from the html. But it's definitely worth considering. I'll make an issue in goskyr linking to this discussion. |
Beta Was this translation helpful? Give feedback.
-
I've found another one, and even more interesting. There's a festival being put on in part by EPFL, and as you might guess they've gone all the way with semantic data. The programme is assembled with JavaScript in the DOM from their events API! So here's the question part: do you think it would be better to add this functionality to Goskyr, or to create a completely new tool? |
Beta Was this translation helpful? Give feedback.
-
From what I can see in the goskyr code it does the selection in just one or two places, so I'm leaning more toward your second option. If you don't mind I think I'd like to take a shot at implementing it. |
Beta Was this translation helpful? Give feedback.
-
Paginatination might be interesting ... |
Beta Was this translation helpful? Give feedback.
-
OK, I'm on leave for a couple of days (for Cully Jazz), so during the daytime I'll make a play branch, and try some things out. Then I'll come back here to discuss the format additions to the config.yml file. |
Beta Was this translation helpful? Give feedback.
-
I'm pleased to announce that I have working code: https://github.com/MarkJaroski/goskyr/tree/json-experimental It seems to work with this config:
There are some issues with the target site's json, so there are a couple of hacks in the goskyr code to clean it up. |
Beta Was this translation helpful? Give feedback.
-
There are some trade-offs to consider, and I don't yet know what to do with a RESTfull API. It might just work, or it might require work. Hard to say. |
Beta Was this translation helpful? Give feedback.
-
Thanks, awesome! I'll test this as soon as I can! |
Beta Was this translation helpful? Give feedback.
-
Sorry that it takes me so long,I was on holidays. I'll look into it next week at the latest! |
Beta Was this translation helpful? Give feedback.
-
It's OK. No problem at all. I was at a team retreat in Budapest last week
anyway, and am only now getting back to some kind of normalcy.
…On Wed, 3 May 2023 at 10:32, jakopako ***@***.***> wrote:
Sorry that it takes me so long,I was on holidays. I'll look into it next
week at the latest!
—
Reply to this email directly, view it on GitHub
<#223 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAATLBWFXYMKMQKUAUOAQNLXEIJYTANCNFSM6AAAAAAV7PXNKQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
So I just looked at it and it looks good. I just had to make some minor changes related to some edge cases and error handling.
This would be the modified function. (I didn't know how to quickly update your branch as I don't have permission) There are still some other cases where json parsing comes into play but I think it's fine to merge this (partial) feature now and proceed in small steps rather then handling all the cases now. Just for the record, right now I can see two other cases involving json parsing:
We can look at those two cases separately. So if you agree you can make a pull request with your current changes (+ my mods). Thanks for your work! :) |
Beta Was this translation helpful? Give feedback.
-
I'm working on a site which has a json snippet for each event:
Which is a pretty interesting way to handle things.
Beta Was this translation helpful? Give feedback.
All reactions