Request for powerflv.com script or plugin
#1
Lightbulb 
How about someone try to make a script for this site.

http://www.powerflv.com
Reply
#2
very cool site.. thx for pointing it out.
Since there is so many cool sites and too much work for programmers to create for each site im lookin into Linux app to browse net with. X-dsl or gentoox. I like xbmc scripts but it may be too much to keep askin for web sites all the time.
Reply
#3
That is indeed a really simple site to script. It's a pity I don't have time right now. If any other scripter wants to do it: To get the flash movies, you have to grab the file http://powerflv.com/datamongster?li= + the "li" value from the link of the selected episode popup. Just found that out sniffing with ethereal while starting the flash player. What you get is something like this:
Code:
&parts=2&aa=http%3A%2F%2Flax-v95.lax.youtube.com%2Fget_video%3Fvideo_id%3DJV-CiXBX-KE&bb=http%3A%2F%2Flax-v208.lax.youtube.com%2Fget_video%3Fvideo_id%3DfID-9oHJ_Cw&linktext=powerflv.com&linkurl=http%3A%2F%2Fpowerflv.com%2F&autoplay=1&loop=0&v=75&dwn=no&preloader=
which is a urlencode_plus'ed url listing of the flv files.
This should be the only thing you cannot grab from the html source. Should be a pretty simple regex task.
When writing the plugin, please also keep http://divxpawa.com/ in mind, it is a partner site with a similar layout, but with just divx movies in it.
Maybe it's also worth informing one of the uitzendinggemist coders.
Reply
#4
I tried a bit to learn regular expressions. These are not great, but they do work. It's not a plugin yet, it's just nearly all you need to make a plugin, just grab the regular expressions from the sample testing code below. Anyone make a plugin of those?

Code:
import urllib,re

print "Grabbing main categories"
f=urllib.urlopen("http://powerflv.com")
a=f.read()
p=re.compile(r'<a href="\.(\?cat=\w*)".+?/> (\w*)')
match=p.findall(a)
for a in match:
        print a
print
print "Grabbing category Cartoons"
f=urllib.urlopen("http://powerflv.com?cat=Cartoons")
a=f.read()
p=re.compile(r'<a href=\"\.(\?.+?)" .+? \/> (.+?)</a><br />')
match=p.findall(a)
for a in match:
        print a

print
print "Grabbing TV show seasons for Ah My Goddess"
f=urllib.urlopen("http://powerflv.com/?cat=Anime&subcat=Ah%21+My+Goddess")
a=f.read()
p=re.compile(r'<h4>(.+?)</h4>')
match=p.findall(a)
for a in match:
        print a


parm='Oh My Goddess! (OVA) - Stage6'
print
print "Grabbing TV shows for season "+parm+" for TV show Ah My Goddess"
f=urllib.urlopen("http://powerflv.com/?cat=Anime&subcat=Ah%21+My+Goddess")
a=f.read()
sect=re.compile(r"<h4>"+re.escape(parm)+r"</h4>(.+?)</(h4|html)>",re.DOTALL)
matches1=sect.findall(a)
for sectionmatch in matches1:
        p=re.compile(r"<a onclick=\"popscreen\(\'(.+?)\'.+?\/\> (.+?)</a><br />")
        match=p.findall(sectionmatch[0])
        for a in match:
                print a

print
print "Grabbing Divx file"
f=urllib.urlopen("http://powerflv.com/play2?cat=Anime&subcat=Ah%21+My+Goddess&subsubcat=Oh+My+Goddess%21+%28OVA%29+-+Stage6&actual_title=Moonlight+And+Cherry+Blossoms")
a=f.read()
p=re.compile(r'<embed .+?src="(.+?)"')
match=p.findall(a)
for a in match:
        print a

print
print "Grabbing Veoh file"
f=urllib.urlopen("http://powerflv.com/play2?cat=Anime&subcat=Ah%21+My+Goddess&subsubcat=Ah%21+My+Goddess+Season+2+-+Veoh&actual_title=Ah%21+I+Want+to+Be+of+Help+to+You%21")
a=f.read()
p=re.compile(r'<iframe src="http\:\/\/www\.veoh\.com/.+?\.swf\?permalinkId=(.+?)&')
match=p.findall(a)
for a in match:
        print a
print "get Veoh video url for this,see http://www.jeroenwijering.com/?thread=6207"
print "http://www.veoh.com/rest/video/[ID]/details"
print "-> xml ->path to flv in fullPreviewHashPath tag"
print "no time to do this myself right now. but xml parsing is easy using minidom or something. did that in seeqpod plugin for example"

print
print "Grabbing powerflv player files"
f=urllib.urlopen("http://powerflv.com/play2?cat=Movies&subcat=Fury+of+the+Wolfman&subsubcat=Fury+of+the+Wolfman&actual_title=Fury+of+the+Wolfman")
a=f.read()
p=re.compile(r'http\:\/\/powerflv\.com\/powerflv4\.swf\?li\=(.+?)&')
match=p.findall(a)
for a in match:
        f=urllib.urlopen("http://powerflv.com/datamongster?li="+a)
        c=f.read()
        parameters=[]
        if c[0]=="&": c=c[1:-1]
        parms=c.split("&")
        parts=1
        urls=[]
        for parm in parms:
                splitparms=parm.split("=")
                if splitparms[0]=="parts":
                        parts=int(splitparms[1])
                else:
                        if parts>0:
                                parts=parts-1
                                urls.append(urllib.unquote_plus(splitparms[1]))
        for url in urls:
                print url


print
print "Grabbing embedded Youtube iframe video"
esc=re.escape("<iframe src=\"http://youtube.com/watch?v=")
f=urllib.urlopen("http://powerflv.com/play2?cat=Shows&subcat=Ready+Or+Not&subsubcat=Season+4&actual_title=Glamour+Girl+")
a=f.read()
p=re.compile(esc+'(.+?)"')
match=p.findall(a)
for b in match:
        #google now caches videos for us, very convenient for grabbing the url! does this work for all vids?
        print "http://cache.googlevideo.com/get_video?video_id="+b
print "Grabbing other parts of same video"
p=re.compile(r'<a href\=\"(play2\?.+?&part=[0-9]+?)"')
match=p.findall(a)
for a in match:
        print "http://powerflv.com/"+a

print
print "Grabbing Google Video file"
f=urllib.urlopen("http://powerflv.com/play2?cat=Documentaries&subcat=Corporation%2C+The+%282003%29&subsubcat=Corporation%2C+The+%282003%29+-+Google+Video&actual_title=Corporation%2C+The+%282003%29+-+Google+Video&part=1")
a=f.read()
p=re.compile(re.escape('<param name="movie" value="http://video.google.com/googleplayer.swf?&videoUrl=')+'(.+?)"')
match=p.findall(a)
for a in match:
        print urllib.unquote_plus(a)


print
print "Grabbing freeflashplayer file"
f=urllib.urlopen("http://powerflv.com/play2?cat=Documentaries&subcat=Breakfast+with+Hunter+%282003%29&subsubcat=Breakfast+with+Hunter+%282003%29+-+Dailymotion&actual_title=Breakfast+with+Hunter+%282003%29+-+Dailymotion")
a=f.read()
p=re.compile(re.escape('<param name="movie" value="http://freeflashplayer.net/flvplayer.swf?url=')+'(.+?)&')
match=p.findall(a)
for a in match:
        print urllib.unquote_plus( a)


print
print "Grabbing Guba video"
f=urllib.urlopen("http://powerflv.com/play2?cat=Cartoons&subcat=Centurions%2C+The+%281986%29&subsubcat=Season+1+-+Youtube&actual_title=An+Alien+Affair+%5BGUBA%5D")
a=f.read()
p=re.compile(re.escape('<embed src="http://www.guba.com')+'.+?\?.+?bid\=(.+?)[?|&]')
match=p.findall(a)
for a in match:
        print "http://free.guba.com/uploaditem/"+a+"/flash.flv"

I know it's very ugly, it's just my sample code and I don't know when I will have time again to work on this. Google Video Iframes don't work yet and Veoh needs some simple xml parsing (copy from seeqpod and see the comments in this code here).

Edit: Guba and google video now works , also freeflashplayer stuff.
Reply
#5
The plugin is ready...you can find it here:
http://rapidshare.com/files/59982084/PowerFLV.zip
Here is the release thread. Please ask your questions over there:
http://forum.xbmc.org/showthread.php?p=151776
Reply

Logout Mark Read Team Forum Stats Members Help
Request for powerflv.com script or plugin0