Hey all,
Attempting to create my first bundle for Naruto Shippuden over at NarutoGet.com; this is the first time I've tried my hand at programming anything web-related, and Im running into an issue with creating the VideoObject / VideoMenu. When parsing the site which has the episode embedded into it, my html request cant seem to find the src attribute that resides in the iframe:
< td id="embedcode" style="padding: 0px;"><script> … </script> <iframe width="670" scrolling="no" height="400" frameborder="0" src="http://online.narutoget.com/s/googplayer.php?skintype=nget&to=1002kEhprnVM&autostart=false&id=112965806382805543465/Nshop3ss41Hd#5953866251562821890">#document
I've tried a couple variants with xpath, but every combination of //td[@id="embedcode"] , //iframe[@width="670"] provides me with an empty list.
Here's the def:
@route('/video/naruto/videos')
def VideoMenu(videoURL, title):
oc = ObjectContainer(title2 = title)
data = HTML.ElementFromURL(videoURL)
for video in data.xpath('//div[@id="side-a"]'):
try:
title = video.xpath('//td[@class="style100"]//text()')[1]
Log(title)
sources = video.xpath('//td[@id="embedcode"]//iframe')
Log(sources)
except:
continue
oc.add(CreateVideoClipObject(
title = title,
string = sources
))
return oc
Any ideas?
Thanks!
