[Request] new gen of AQTbrowser
#1
not sure everyone knows, but i got it from a trustworthy source that there's a way to make aqt more bulletproof. the solution is quite genious.

here's the story: itunes has apple trailer support. it does this by an .xml file somewhere on their site. if we could sniff that xml out and parse it, we would be there. Confusedaint:

i'm not a skilled python coder, in fact, i never done anything in python before. nevertheless, i'm gonna see if i can figure it out, but no promises whatsoever.

any takers? (skilled coders?)
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
#2
from guybrush:

http://www.apple.com/moviesxml/h/index.xml
or
http://www.apple.com/moviesxml/h/view1_all.xml
(set your user agent to "itunes/4.5")

sneaky eh?, xml is perfect for these kind of things Wink

itunes uses these urls for trailers, so the format wont change or they will break their own application.

firefox plugin to change user agents:
https://update.mozilla.org/extensions/mo...59&vid=617
#3
great stuff... now is there a way to specify user agents in python?

if so this change would be relatively simple. im still a python newb myself.
#4
yes there is, pretty ez actually

http://diveintopython.org/http_web_servi...agent.html
#5
:bump:

anyone interested in looking into this?
#6
yes
have a look in python script launchbrowser for example (from flash)
it uses http-header
#7
sorry to be ot, but is there a way of increasing the amount of cache used by aqt ? currently i get about 10 secs of good fluid motion with large trailers before they jam up. medium quality is crap in comparison, so i'm sure a "x secs content" cache would work so much better... is this even a part of aqt tho, or does xbmc take over this bit and i can adjust this in the settings menu ?
#8
i dont think its the cache...mine is hard locking the xbox. i increased the cache to 16mb and it played for lunger but still locked up.
#9
(pho @ feb. 07 2005,14:24 Wrote:sorry to be ot, but is there a way of increasing the amount of cache used by aqt ? currently i get about 10 secs of good fluid motion with large trailers before they jam up. medium quality is crap in comparison, so i'm sure a "x secs content" cache would work so much better... is this even a part of aqt tho, or does xbmc take over this bit and i can adjust this in the settings menu ?
hmm.. i think mine downloads the entire trailer before playing.. it take a while but the quality is awesome...
#10
yeah i think flash modded it to have a download-and-play option available by editting the file.

as long as the current version is working we should keep aqt as is but if it breaks again than switching to this xml can be done then.
#11
here's the xpaths to use to find the relevant information in the xml files from apple.com. i tested most of them using java/jdom to make sure i had the right values.
:kickass:

i'll probably change aqtbrowser to use those if i can find a usable xml/xpath lib for python.

Quote:index file: http://www.apple.com/moviesxml/h/index.xml

$base = /document/scrollview/matrixview/vboxview[1]/matrixview

exclusive: $base/vboxview[3]/vboxview[2]/matrixview/view/vboxview/matrixview/vboxview/hboxview/gotourl
url = ./@url
title = trim(./textview[1])

opening this week: $base/vboxview[3]/vboxview[@viewname='opening this week']/vboxview[2]/matrixview/view/vboxview/gotourl
url = ./@url
title = trim(./textview[1]/b)
studio = trim(./textview[2])

categories: $base/vboxview[1]/vboxview[4]/matrixview/view/vboxview/hboxview/textview/gotourl
url = ./@url
name = trim(./value())

movie studios: $base/vboxview[1]/vboxview[6]/matrixview/view/vboxview/hboxview/textview/gotourl
url = ./@url
name = trim(./value())

new movie trailers url: $base/vboxview[2]/view/matrixview/textview[2]/gotourl/@url

new movie trailers: http://www.apple.com/moviesxml/h/view1_all.xml

note: the following xpaths also apply to all trailers index files downloaded from the urls found in the xml files.

"x-y of z": trim(/document/scrollview/matrixview/matrixview/vboxview/hboxview[1]/textview/b)
note: use this to know if there is more page: if (z > y)

movies: /document/scrollview/matrixview/matrixview/vboxview/matrixview/hboxview/vboxview/matrixview
url= ./gotourl/@url
thumb= ./gotourl/pictureview/@url
width= ./gotourl/pictureview/@width
height= ./gotourl/pictureview/@height
title= trim(./vboxview/hboxview/textview/gotourl/b)
studio = trim(./vboxview/textview[1]/gotourl)
actors = trim(./vboxview/textview[2])
category = trim(./vboxview/textview[3]/gotourl)
rating = trim(./vboxview/textview[4])


movie trailer page: $url from trailers index xml

smallurl = /document/scrollview/matrixview/view/vboxview/hboxview/matrixview/hboxview/vboxview/hboxview/gotourl[1]/@url
mediumurl = /document/scrollview/matrixview/view/vboxview/hboxview/matrixview/hboxview/vboxview/hboxview/gotourl[2]/@url
largeurl = /document/scrollview/matrixview/view/vboxview/hboxview/matrixview/hboxview/vboxview/hboxview/gotourl[3]/@url
note: those are relative urls... need to resolve them to absolute urls using the current url path.


movie page: $smallurl or $mediumurl or $largeurl
movieurl = /document/scrollview/matrixview/view/vboxview/hboxview[2]/matrixview/movieview/@url
or //movieview/@url
#12
just did an initial text with pyxml:
loading http://www.apple.com/moviesxml/h/index.xml alone takes 9 seconds. that includes only getting the file from the website and parsing it into an xml document.
if i get this down to an acceptable value, i'll continue the script. otherwise, we'll have to keep aqtbrowser the way it is.
#13
is it 9 sec during startup of the script? i could live with that if it would secure the script from being outdated....
#14
i did some basic parsing. i can now extract the exclusive movie trailers (6 of them on the index xml page) and find their respective url. some have one 3 urls (for small, medium and large), others have as many as 9 (3 formats x 2 teasers + 1 tv version). i'll try to show all the available movies, but apple don't include any intelligible text with those links, so i'll probably show the end of the urls (small.xml, fullscreen.xml, teaser/small.xml, etc.)
by using threads, and parsing the information in the right order, i think i will be able to get this script pretty usable.
should have a test version avail. in a couple of days.

*edit: now waiting for an answer to http://www.xboxmediaplayer.de/cgi-bin....t=11430 before this can work...
#15
the xml processing is done and working.
i tried to migrate the original aqtbrowser.py to use it, and it's not working very well.

http://pub.abuserz.com/xmlqt.rar

copy the file + directory from lib/* to your xbmc/python/lib directory.
copy aqtbrowser directory and .py file to your xbmc/scripts directory.

it doesn't work very well (or even at all).
if you quit the script without doing anything, xbmc hangs.
if you try to play any trailer, it might kinda play, and will probably hang during play or if you try to play a second trailer.
i already took 4 days of my time on this. i probably won't invest any more time...
i don't know what the problem(s) is, so if anyone can fix it to make it usable, then simply post a working version when you're done.
maybe darkie, who i think implemented python into xbmc, could debug and see what's happening.

there is no thumbnails in this version, even if they are cached.

- mouton

Logout Mark Read Team Forum Stats Members Help
[Request] new gen of AQTbrowser0