I have a quick question to ask, as i cant see it in their docs. Maybe you can help me.
I am using http://simplehtmldom.sourceforge.net/
Right, i have written a Simple HTML Dom script to collect data from this page, as an example:
http://www.visualdesign.ie/_dev/myscraper/simplehtmldom/dev-env/scraping/daily/daily.html
Script executed by running a cron job on this file (which generates the XML):
http://www.visualdesign.ie/_dev/myscraper/simplehtmldom/dev-env/scraping/daily/daily.php
The data is collected, and written to this file in XML file:
http://www.visualdesign.ie/_dev/myscraper/simplehtmldom/dev-env/scraping/daily/daily.xml
Thats is fine, and the script essentially scrapes the entire page, with no conditional IF’s for any sections.
A sample of my code for one segment is below:
http://pastebin.com/JLb8f92N
What i would like to do now, and i am hoping you could help out is…
Scrap this same page, but produce seperate XML files, based on the date.
So if you view that page, i want to scrape the data in the table Saturday 4th February 2012 and produce XML for for that day only.
The i want to scrape the data in the section for Sunday 5th February 2012, and another for Tuesday 7th February 2012. I think its self explanatory.
The table date sections are separated by this HTML element: bg color = " #CCCCCC "
But bare in mind that the table rows on each date section will change when the site is updated, and there may be additional or less football game records.
Anyway, i would appreciate any help you can show me, on how to place in any conditionals in the code, and only scrape the date sections needed.
Separate script files would be fine if it was needed.
Many thanks for your time,
Darren.