# Debug xpath

**URL:** <https://forums.plex.tv/t/debug-xpath/4112>\
**Category:** Dev/API Corner\
**Tags:** plugin-dev\
**Created:** [June 1, 2010, 12:58am UTC](https://forums.plex.tv/t/debug-xpath/4112 "2010-06-01T00:58:59Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![hrcolb0](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/hrcolb0/32/380_2.png) [@hrcolb0](https://forums.plex.tv/u/hrcolb0)\
**Post date:** [June 1, 2010, 12:58am UTC](https://forums.plex.tv/t/debug-xpath/4112/1 "2010-06-01T00:58:59Z")

</div>

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](http://www.fox.com/fod/play.php?sh=americandad)

---

<div class="post-metadata">

**Author:** ![jwray](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/jwray/32/99832_2.png) [@jwray](https://forums.plex.tv/u/jwray)\
**Post date:** [June 1, 2010, 2:50am UTC](https://forums.plex.tv/t/debug-xpath/4112/2 "2010-06-01T02:50:25Z")

</div>

I use this:  
  
  
  
[https://addons.mozilla.org/en-US/firefox/addon/1095/](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

---

<div class="post-metadata">

**Author:** ![Dbl\_A](https://avatars.discourse-cdn.com/v4/letter/d/53a042/32.png) [@Dbl\_A](https://forums.plex.tv/u/Dbl_A)\
**Post date:** [June 1, 2010, 3:40am UTC](https://forums.plex.tv/t/debug-xpath/4112/3 "2010-06-01T03:40:22Z")

</div>

Looks like it’s generated by Javascript…  
  
have you tried this…  
  
  
  
[http://www.fox.com/fod/americandad/rss.xml](http://www.fox.com/fod/americandad/rss.xml)

---

<div class="post-metadata">

**Author:** ![hrcolb0](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/hrcolb0/32/380_2.png) [@hrcolb0](https://forums.plex.tv/u/hrcolb0)\
**Post date:** [June 1, 2010, 11:10pm UTC](https://forums.plex.tv/t/debug-xpath/4112/4 "2010-06-01T23:10:14Z")

</div>

> [@](#):
>
> 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.

---

<div class="post-metadata">

**Author:** ![jwray](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/jwray/32/99832_2.png) [@jwray](https://forums.plex.tv/u/jwray)\
**Post date:** [June 2, 2010, 12:31am UTC](https://forums.plex.tv/t/debug-xpath/4112/5 "2010-06-02T00:31:14Z")

</div>

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

> [@](#):
>
> 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.

---

<div class="post-metadata">

**Author:** ![hrcolb0](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/hrcolb0/32/380_2.png) [@hrcolb0](https://forums.plex.tv/u/hrcolb0)\
**Post date:** [June 2, 2010, 11:38pm UTC](https://forums.plex.tv/t/debug-xpath/4112/6 "2010-06-02T23:38:30Z")

</div>

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](http://fox.com). Two reasons:

1. 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?  
  
  
2. 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.

---

<div class="post-metadata">

**Author:** ![Dbl\_A](https://avatars.discourse-cdn.com/v4/letter/d/53a042/32.png) [@Dbl\_A](https://forums.plex.tv/u/Dbl_A)\
**Post date:** [June 3, 2010, 1:00am UTC](https://forums.plex.tv/t/debug-xpath/4112/7 "2010-06-03T01:00:55Z")

</div>

> [@](#):
>
> 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:  
>   
> 1) 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?

  
  
  
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.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [December 20, 2019, 8:52pm UTC](https://forums.plex.tv/t/debug-xpath/4112/8 "2019-12-20T20:52:00Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
