• 1
  • 3
  • 4
  • 5
  • 6(current)
  • 7
[RELEASE] PowerFLV.com (Video) Plugin
#76
f8lcoder Wrote:Humbly, I would like to reiterate and be perfectly clear that it has been established many times in entries throughout this thread:

1.) powerFLV IS a Plugin
2.) powerFLV IS NOT a Script

Furthermore, it is not my work and I will take no such credit. There are many talented programmers here and to take credit for anyone else’s work would be a sacrilege.

I believe Ubehagen is to thank for possibly creating this plugin and Nuka may have contributed to updating it and appears to be fielding maintenance/troubleshooting.

Credit goes to those, not I.
Smile
FC


quit your yakking.
Reply
#77
DigitalG Wrote:quit your yakking.

Kindly, go f**K yourself...
Reply
#78
Thanks alot nickspoon
Reply
#79
Hello everyone, first post. Nickspoon & python people, any ideas ?

I have been tinkering with the PowerFlv plugin Myself and was dismayed to see the M*gavid*o links would not not register. After a bit of messing i thought that the plugin would not resolve the true path to the flv`s ( I may be wrong here. ) so i wrote this ammendment to the script : -

Code:
import urllib,re,sys,socket,webbrowser,urllib2,webbrowser

res=[]
#f=urllib.urlopen("http://mojo.hostsnake.com/play2.htm")
#a=f.read()
#f.close()
p=re.compile(r'<iframe src=\"(http\://.+?\.megavideo\.com/v/(.+?))"')
match=p.findall(a)
for a in match:
    a=a[-1]
    a=a[:-45]
    link = 'http://www.megaupload.net/keepvid.php'
    data = "url="+"http://www.megavideo.com/?v="+a+"&site=aa"
    req = urllib2.Request(link, data)
    response = urllib2.urlopen(req)
    results = response.read()
    p=re.compile(r'<br /><a href="(http://.+?)"')
    flv=p.findall(results)
    for link in flv:
        res.append(link)
#webbrowser.open(b)

The hashed out lines are for pc testing. If you run that script it gets the m*gavid*o url then shortens it to the correct size and sends a post, reads back the reply recompiles it then gives the link. As this script uses a certain online flv resolver it can resolve just about any link give to the true path. So it`s handy anyway. It can resolve :-

56.com, 5min, 9you, Bofunk, Break, ClipFish.de, ClipLife.jp, ClipJunkie, ClipShack, CollegeHumor, CrunchyRoll, Dailymotion, DingTV, DoubleAgent, eSnips, ExpertVillage, Flurl, FunnyJunk, FunnyorDie, Glumbert, GoFish, Google Video, Hallpass, HowCast, IndiaFM, iShare.Rediff, Izlesene, Jokeroo, Jumpcut, ku6, LiveVideo, LiveLeak, lulu.tv, Megavideo, Metacafe, MilkandCookies, MonkeySee, MusicMaza, Myspace, MyVideo.de, PokerTube, Putfile, SantaBanta, Sharkle, Shoutfile, Spike, StupidVideos, SuperNovaTube, TeacherTube, Tudou, Twango, Veoh, Videa.hu, Vidiac, Vidivodo, Viddyou, Vimeo, Yahoo Videos, Yikers, Youku, Youtube, ZippyVideos

and quite a few more.

But my problem is that when i run the code in the powerflv plugin it will not display the links for megavideo. if i just use the code : -

p=re.compile(r'<iframe src=\"(http\://.+?\.megavideo\.com/v/(.+?))"')
match=p.findall(a)
for a in match:
a=a[-1]
a=a[:-45]
res.append(a)

it displays the links with the un resolved path. ie www.m*gavid*o.com/?v=(8-digits)

when the resolution code is in place it finds the true path and appends res with -
e.g http://www17.m*gavid*o.com/files/8786f08..._video.flv

I`m very frustrated.

I also updated the veoh links again as it wasn`t displaying all the embedded links for everything listed. just add :-

&player=.+?&videoAutoPlay=.+? after ?permalinkId=(.+?) in both Veoh and veoh embedded.

Help would be appreciated. Thanks Voinage.
Reply
#80
it's really hard to follow code that isn't formatted. is the above edit correct?
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#81
Yes, direct copy from Idle. It runs for me when i test it and when inserted into the powerflv plugin and ran, it throws no errors. The above code was for testing separately.

This is the format within the Your PowerFlv script, and thanks for you time Nuka1195.

def getMegavideo(a):
res=[]
p=re.compile(r'<iframe src=\"(http\://.+?\.megavideo\.com/v/(.+?))"')
match=p.findall(a)
for a in match:
a=a[-1]
a=a[:-45]
link = 'http://www.megaupload.net/keepvid.php'
data = "url="+"http://www.megavideo.com/?v="+a+"&site=aa"
req = urllib2.Request(link, data)
response = urllib2.urlopen(req)
results = response.read()
p=re.compile(r'<br /><a href="(http://.+?)"')
flv=p.findall(results)
for link in flv:
res.append(link)
return res
Reply
#82
Oh and Nuka, could you please pass those fixes for tidying up and library mode on. When i do get it to function would be better if was running clean. Thanks, if not i`ll sort it myself when i debug again.
Reply
#83
yeah if you start wrapping you code in [ CODE ] blocks Smile

Also it's not my plugin for the record.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#84
Thanks for the fixes, sir. Much obliged.
From this day forward i will wrap my code in blocks:-> Judging by the size of it though, i thought it already was hehe. Need to get a lot better and tidier. cheers.
Reply
#85
Right, sorry about the delay. Here's a version with various fixes and support for videos which use the easyTV player: http://fools.bigbudden.com/nickspoon/PowerFLV.zip

If you find videos that don't work at all (there will be many, I'm sure) tell me the category, series name, season and episode, and I'll see if I can add support for the provider it uses.

Voinage: I'm not the owner of this plugin, but I would rather not depend on an external website to obtain video links. I prefer to parse them in the script, so that we aren't left without videos if the sites go down and we don't put any bandwidth stress on whoever hosts them. What goes in the official script is not my decision, as I said, but that's my personal stance and why I'm trying to parse as many services as I can within the script itself.
Reply
#86
To voinage:
Your problem fetching flv url using that website is probably because of your HTTP POST queryString you are sending, use wireshark to make sure you have it verbatim as the site would accept it.
However, check out clipnabber.com it also can fetch megavideo url but with GET instead of POST. (easier) Check it out with url snooper.

Here's some changes I made to powerflv script from 12-3, it boots correctly as video plugin, but most host site fetch flv algos are outdated. Here's some more info:
Quote:Fixed/improved patterns for parsing powerflv site, (plugin now loads) most of the host site flv retrievers (like google..etc..) are outdated, algos to fetch flv need to be fixed etc...
Get program "url snooper" for help in creating algo to fetch flv url from host site

http://phpfi.com/306595
Spread the knowledge, nothing else.Image
Reply
#87
To nickspoon:
If you can fetch flv url to megavideo without using external site, I'll be impressed.
Good news is, is that the final flv url isn't in pieces like youku, so an win32 app that can sniff the flv url right from the booted swf CAN work. In order to use this with xbox however, you'll have to create a remote page that xbox can access that will call this pc app, the means to the end of doing this compared to using sites like clipnabber is probably more complicated though...

Aside from this, megavideo seems to be encrypting something, figure it out. Smile
Spread the knowledge, nothing else.Image
Reply
#88
Thanks for the input Plex.The post query is perfect and when integrated in the program it does retrieve the correct url. My problem is that when the new url will not append to (res).
If i just grab the original url (80 characters) then shorten it to 35 characters and sub the /v/ for /v? it will append the url. Don`t know whats going on here but i am determined to sort this. Been looking at the Megavideo algo in xot and that works perfectly.

Either way it`s going to work.
Reply
#89
Basje,

Would you mind awfully, if i implemented your great Megavideo Algo in the Powerflv plugin ?

It`s working perfectly for me at the moment and i don`t need to post to a site first.
If you have a problem with me using your code i will remove it and use my first code which is now 100% functional but it uses a site and as i do agree with Nickspoon about loosing content.

Thanks, a hopefull, Voinage.

Thanks Voinage.
Reply
#90
Here is my function for getting MegaVideo flv links:
Code:
def getMegaVideo(a):
    res=[]
    lookup={"_":"b", "I":"t", "J":"w", "K":"v", "M":"p", "N":"s", "P":"m", "Q":"l", "R":"o", "T":"i", "U":"h", "X":"e", "Y":"d", "Z":"g", "%04":"9", "%05":"8", "%07":":", "%08":"5", "%09":"4", "%0A":"7", "%0B":"6", "%0C":"1", "%0D":"0", "%0E":"3", "%0F":"2", "%12":"/", "%13":".", "%5B":"f", "%5C":"a", "%5E":"c"}
    p=re.compile(r'<iframe src="http://www\.megavideo\.com/(.+?)"')
    q=p.findall(a)
    if len(q) == 0:
        return res
    f=urllib.urlopen("http://www.megavideo.com/"+q[0])
    url=f.url
    f.close()
    p=re.compile(r'&v=(.+?)&u')
    q=p.findall(url)
    if len(q) == 0:
        return res
    f=urllib.urlopen("http://www.megavideo.com/?v=" + q[0])
    a=f.read()
    f.close()
    p=re.compile(r'fo\.addVariable\("flv","(.+?)"\);')
    q=p.findall(a)
    i = 0
    url=""
    while i < len(q[0]):
        if q[0][i] == "%":
            character = q[0][i] + q[0][i+1] + q[0][i+2]
            i = i + 2
        else:
            character = q[0][i]
        character=lookup[character]
        url = "".join((url,character))
        i = i + 1
    res.append(url)
    return res

Unfortunately, I have yet to get a MegaVideo video stream to work on XBMC. The URLs this function spits out work fine with VLC and the PC version of MPlayer. Maybe somebody else will have more luck.
Reply
  • 1
  • 3
  • 4
  • 5
  • 6(current)
  • 7

Logout Mark Read Team Forum Stats Members Help
[RELEASE] PowerFLV.com (Video) Plugin0