tnaflix fix
Code:
elif "tnaflix" in url:
match = re.compile('<a style="color:#BBB;" href="(.+?)" target="_blank" rel="nofollow">tnaflix</a></span>').findall(html)
for gurl in match:
urlget2 = gurl
html = get_html(urlget2)
match = re.compile("so\.addVariable\('config', '(.*?)'").findall(html)
for each in match:
gurl2=urllib.unquote(each)
fetchurl = re.split('</?file>',get_html(gurl2))[1]
print "fetchurl: %s" % fetchurl
return fetchurl
RedTube typo:
Code:
fetchurl = string.split(string.split(each, "&")[8], "=")[1]
fetchurl = urllib.unquote(fetch)
Should be
Code:
fetchurl = string.split(string.split(each, "&")[8], "=")[1]
fetchurl = urllib.unquote(fetchurl)
Added clipnabber backup for unsupported videos.
Code:
else:
"""Clipnabber"""
#get the name of the resource
r = re.compile('permalink/(.*?)/').findall(url)[0]
print "Unknown source (%s). Trying clipnabber" % r
#get the link
gurl = re.compile('<a[^>]+href="(.*?)"[^>]*>%s</a>' % r).findall(html)[0]
kid = re.compile('id="Math">(\d+)').findall(get_html('http://clipnabber.com/mini.php'))[0]
html = get_html('http://clipnabber.com/gethint.php?mode=1&sid=%s&url=%s' % (kid,urllib.quote(gurl)) )
fetchurl = re.compile("<a href='(.*?)'").findall(html)[0]
print "Fetchurl: %s" % fetchurl
return fetchurl
Another small thing
should be
Code:
elif "megarotic" in url:
Although, i think they have completely done away with megarotic so could probably even take that out.
Also, in the collections area there's a part
Code:
match = re.compile('\(\'(.+?)\', ([0-9]*),\'(.+?)\', \'(.+?)\'\);return false;" href="#">next').findall(html)
if len(match) > 5:
i had to change that to > 1 in order to get the Next Page for a collection.
I think those are all the changes i made. I'll try to remember if there's anything else.
(btw, i'm not a python developer. I've only been doing python for like a week. i truly honestly hate the language and if it wasn't for XBMC, i wouldn't even touch it.)