Extract all data from a webpage where rows of data vary from day to day.
Posted: November 5th, 2019, 10:24 pm
I use NextPVR to record TV shows on my pc. I use the following webparser regex to extract future tv recordings data from NextPVRs local webserver:
RegExp="(?siU)(?(?=.*<div class).*"listing.*">(.*)<.div>)(?(?=.*<div class).*"airDate">(.*)<.div>)(?(?=.*<div class).*"airTime">(.*)<.div>)(?(?=.*<div class).*"channelNum">(.*)<.div>)(?(?=<div class).*"channelName">(.*)<.div>).*(?(?=.*onclick).*return false;">(.*)<.a>)"
The above code extracts 1 TV recording. If I want to view more than one recording then I make a copy of the code above and paste it multiple times corresponding to the number of recordings I want to see. The problem is that if the webserver contains 20 future recordings and I am trying to webparse 21 then my rainmeter skin doesn't work because I have tried to webparse beyond the data that is on the webserver. Given that the data is TV show recordings then it can vary from day to day.
Currently my skin shows the next 8 TV recordings. If I want to extract ALL future TV recordings data from the webserver, how would I do that given that the amount of data can vary from day to day? Is there a magical webparser regex expression that can run on varying amounts of data from a webserver? Or is there a Rainmeter function that can count the amount of data in the webserver and then run a webparser on the number counted?
RegExp="(?siU)(?(?=.*<div class).*"listing.*">(.*)<.div>)(?(?=.*<div class).*"airDate">(.*)<.div>)(?(?=.*<div class).*"airTime">(.*)<.div>)(?(?=.*<div class).*"channelNum">(.*)<.div>)(?(?=<div class).*"channelName">(.*)<.div>).*(?(?=.*onclick).*return false;">(.*)<.a>)"
The above code extracts 1 TV recording. If I want to view more than one recording then I make a copy of the code above and paste it multiple times corresponding to the number of recordings I want to see. The problem is that if the webserver contains 20 future recordings and I am trying to webparse 21 then my rainmeter skin doesn't work because I have tried to webparse beyond the data that is on the webserver. Given that the data is TV show recordings then it can vary from day to day.
Currently my skin shows the next 8 TV recordings. If I want to extract ALL future TV recordings data from the webserver, how would I do that given that the amount of data can vary from day to day? Is there a magical webparser regex expression that can run on varying amounts of data from a webserver? Or is there a Rainmeter function that can count the amount of data in the webserver and then run a webparser on the number counted?