Is there a way to debug xpath? Specifically, I have this code:
for item2 in content.xpath(’…//div[(@class=“dashpageholder”)]//div/ul/li’):
and it does not return anything even though I know it is there. What am I missing? The page is
http://www.fox.com/fod/play.php?sh=americandad
I use this:
https://addons.mozilla.org/en-US/firefox/addon/1095/
go to a page, right click and you now get a view xpath option. Works great.
Jonny
Looks like it’s generated by Javascript…
have you tried this…
http://www.fox.com/fod/americandad/rss.xml
I have tried that, but I couldn't figure out how to parse the rss instead of the normal HTML. I tried xml.elementfromurl and the rss url, but i never had any luck.
That should work fine - in fact rss is usually easier to work with than html. Sometimes namespace issues can be gotchas but that feed has none.
The xpath predicate ‘/rss/channel’ should give you a list of all channels.
Jonny
Thanks for all the help. I did end up using the rss feed to populate the episodes section. However, and isn’t this a pisser, I am stymied about the site config for fox.com. Two reasons:
- Their controls only come up with mouse movement. Clicking on specific pixels won’t do anything if the player controls are not called up.
Is there another site that has a player like this that has been decoded?
- If you look at American Dad, at least for me that always worked, there is a malibu rum ad that requires a resuming button to be clicked before you can restart your video watching. Normally this wouldn’t be a problem, except that the resume button is outside the normal player window.
The ESPN3 plugin has this... Though its ISP specific (not sure if you can access content, but you can gander at the site config.)
I'm pretty sure the MLB plugin has it too.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.