Closed johnsyweb closed 1 year ago
@johnsyweb, why did you add an event_has_started()
function, instead of assuming everything was live? Did something not work if you started ripping out the if statements/parts that depending on checking if it was live?
Good question. I didn't write the function, someone way smarter did. I simply refactored it to keep track of all the event_info.status == 'Live' || event_info.status == 'unknown'
tests so that if I could find another way to determine whether an event was live, I could implement it once.
I don't think there's a way of doing this without hitting a whole bunch of pages (which is likely to result in firewall action), so this could probably be pulled out.
@fraz3alpha removing event_has_started()
in e0cf2aa has no effect on the behaviour in either browser, so I think this is good to go.
All seems very reasonable, so I have merged it - thanks a lot!
Context
I hit #385 and thought that I should have a go at fixing it rather than simply raising an issue. There's no obvious way to determine whether an event is "live" without scraping, which parkrun do not like - this change assumes all events listed are live.
Change
Remove all references to technical event information and the wiki domain.
Considerations
I like red diffs and I cannot lie.