Hello,
I am new to rainmeter and i am trying to get a tram departure from a tram stop, i live in switzerland so there are APIs but as i say i am very new so want to make a webscraper. I am using this site to get my information: https://search.ch/timetable/Basel,Brausebad
It regularly updates and this sadly changes the HTML source which may make parsing difficult. The problem i am having is identifying the string that i want to parse.
The HTML within the site that i think could be used is highlighted by the asterix. This Tram's number and direction and there are three departures at 15.17+4', 15.25, 15.33. of course the three times change frequently and ultimately what i want to parse
is it possible to write the parser to extract the information between these two long strings? OR if it's not possible at all then I'd like t know now i've only spent an hour or so on it rather than learn a new code just to find out it's not possible. I am also using the "web parser tutorial" for displaying the work
Thanks for any help you can offer.
I am new to rainmeter and i am trying to get a tram departure from a tram stop, i live in switzerland so there are APIs but as i say i am very new so want to make a webscraper. I am using this site to get my information: https://search.ch/timetable/Basel,Brausebad
It regularly updates and this sadly changes the HTML source which may make parsing difficult. The problem i am having is identifying the string that i want to parse.
Code:
[MeasureSite]Measure=PluginPlugin=WebParserURL=https://search.ch/timetable/Basel,BrausebadRegExp=(?siU) I AM STUCK HEREUpdateRate=60[MeasureTram6]Measure=PluginPlugin=WebParserURL=[MeasureSite]StringIndex=1
Code:
*******<text fill="#fff" x="50%" y="50%" dy="0.375em" text-anchor="middle">NUMBER</text>*******</g></svg></a></td><td class="oev-departures-time" data-sortkey="1729689420_+4"><a href="//search.ch/fahrplan/trip/T2024_006168_000823_001_faf86d7_0?time=15.17&date=23.10.2024&in=basel,brausebad" rel="nofollow">15:17<span class="oev-delay oev-late" title="4 min Verspätung">+4'</span></a></td><td class="oev-departures-time"><a href="//search.ch/fahrplan/trip/T2024_006170_000823_001_96cb96f_0?time=15.25&date=23.10.2024&in=basel,brausebad" rel="nofollow">15:25<span class="oev-delay oev-ontime" title="0 min Verspätung">+0'</span></a></td><td class="oev-departures-time"><a href="//search.ch/fahrplan/trip/T2024_006172_000823_005_dd8676d_0?time=15.33&date=23.10.2024&in=basel,brausebad" rel="nofollow">15:33<span class="oev-delay oev-ontime" title="0 min Verspätung">+0'</span></a></td>*******<td class="oev-departures-location">DIRECTION</td>*******
Thanks for any help you can offer.
Statistics: Posted by salt_planes — Yesterday, 2:41 pm — Replies 3 — Views 126