Hey, I'd like to scrape some data from my blog using YQL:
SELECT * FROM html WHERE url="http://site.com/blog" AND xpath="//div[@class='post']"
How can I use different bits of xpath in my query? E.g. can I do something like:
SELECT * FROM html WHERE url="http://site.com/blog" AND xpath="//div[@class='post']" AND xpath ="//div[@class='title']"
assuming I want to get the post and the title? I guess I could take in all the HTML but I'd rather only take what I need as speed is an issue here.
Once I have the HTML I want to extract the text from the markup, is it OK to use PHP regular expressions for this?
I also understand you can use CSS syntax, if you have experience using this with YQL and could guide me in how I could write a similar query to the one above but in CSS rather than XPATH I'd be grateful!
Thanks.