| Ifield (1805),
Crawley (1808), Three
Bridges (1812), Gatwick Airport
(1817), (...) Figure 8 - Excerpt from a departure
table of the least used train station in West Sussex
Say, if we wanted to extract all the stations where this train
calls at.
+ In ECMAScript, that'd be document.querySelectorAll("#scroll0
> span")... And then you have to join the strings, so more
like let a=""; document.querySelectorAll("#scroll0 >
span").forEach((e)=>{a+=e.innerText;}); console.log(a);
+ With regex, I'd start by matching for scroll0".*? .
This leaves us with a lot of spaces, which can be mitigated
by matching for (two spaces in a row). My shell one-liner
looks something like: curl (...) | tr -d '\r\n' | grep -Poh
'scroll0.*?@@g;s/ //g;'
This leaves us with the following payload:
scroll0" class="scrollable"> |