XPath help needed....again....SIGH.....

Okay.....

 

I go to a section, like http://localhost:32400/library/sections/5/all

 

In there, I wants to get the media file location

 

I tried the following:

 

        videos = XML.ElementFromURL(http://localhost:32400/library/sections/5/all).xpath('//Video')    
        for video in videos:            
            title = video.get('title')
            Log.Debug("Movie title is %s" %(title))
            myfilepath = video.xpath('Media/Part/@file')
            Log.Debug("Filepath is %s" %(filepath))

 

 

Bolded part doesn't work, and I've now for close to two days been reading, so smoke is about to pop out of my ears.......

 

And I do get the title

 

 

Anybody wants to teach me here?

 

Best regards

 

Tommy

 

 

Have you tried either:

/Media/Part/@file

or 

//Part/@file

or

./Media/Part/@file

Have you tried either:

/Media/Part/@file

or 

//Part/@file

or

./Media/Part/@file

Sadly, yes to all

/Tommy

Okay.....

I go to a section, like http://localhost:32400/library/sections/5/all

In there, I wants to get the media file location

I tried the following:

        videos = XML.ElementFromURL(http://localhost:32400/library/sections/5/all).xpath('//Video')    
        for video in videos:            
            title = video.get('title')
            Log.Debug("Movie title is %s" %(title))
            myfilepath = video.xpath('Media/Part/@file')
            Log.Debug("Filepath is %s" %(filepath))

Bolded part doesn't work, and I've now for close to two days been reading, so smoke is about to pop out of my ears.......

And I do get the title

Anybody wants to teach me here?

Best regards

Tommy

Somehow, I got fooled by caching.....Restarted PMS, and my origen post worked like a charm....

Note to self, restart PMS from time to time, as well as flush browser, when developing

/T

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