Reputation: 3
I have a google spreadsheet that I'm using to monitor several YouTube videos. For each video I am using ImportXML to grab the following data from individual YouTube video pages:
To be clear - I have no problem using ImportXML in this way. This approach is working perfectly. The problem is that each one of these individual pieces of data uses it's own ImportXML call. This limits me to 16 videos since Google places a reasonable limitation of 50 calls per sheet. 3 datum * 16 videos = 48 calls, 2 less than the maximum.
What I think I'd like to do is make ONE call per video, grab the entire HTML, stuff it into a hidden cell, and PARSE THAT CELL for the data. That'd permit me to grab 50 videos, which has much more appeal obviously.
I've got the plan, but no idea if I could parse a CELL using XPath that way. The documentation I've seen doesn't appear to permit using XPath that way, but it seems so obvious. Has anyone done this, or am I barking up the wrong tree?
Upvotes: 0
Views: 3592
Reputation: 12901
You can't have multiple XPath expressions in a single importXML call.
You can have your functionality with either:
Manipulate your URL - instead of calling the video page, you can call a specific search page. For example: http://www.youtube.com/results?search_query=<your-user-name>
and fetch each column with a specific XPath expression, once for all videos
Have a more general XPath - extract all tags that contain your information and then filter the ones that you need.
Upvotes: 1