submityourflicks: fix
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
import re
|
||||
import urlparse
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from core.item import Item
|
||||
from platformcode import logger
|
||||
@@ -16,7 +17,6 @@ def mainlist(item):
|
||||
viewmode="movie"))
|
||||
itemlist.append(Item(channel=item.channel, action="search", title="Buscar",
|
||||
url="http://www.submityourflicks.com/index.php?mode=search&q=%s&submit=Search"))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
@@ -37,18 +37,6 @@ def search(item, texto):
|
||||
def videos(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
|
||||
'''
|
||||
<div class="item-block item-normal col" >
|
||||
<div class="inner-block">
|
||||
<a href="http://www.submityourflicks.com/1846642-my-hot-wife-bending-over-and-getting-her-cunt-reamed.html" title="My hot wife bending over and getting her cunt reamed..">
|
||||
<span class="image">
|
||||
<script type='text/javascript'>stat['56982c566d05c'] = 0;
|
||||
pic['56982c566d05c'] = new Array();
|
||||
pics['56982c566d05c'] = new Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1);</script>
|
||||
<img src="
|
||||
'''
|
||||
|
||||
data = scrapertools.downloadpageGzip(item.url)
|
||||
patron = '<div class="item-block[^<]+'
|
||||
patron += '<div class="inner-block[^<]+'
|
||||
@@ -56,34 +44,26 @@ def videos(item):
|
||||
patron += '<span class="image".*?'
|
||||
patron += '<img src="([^"]+)"'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
for scrapedurl, scrapedtitle, scrapedthumbnail in matches:
|
||||
title = scrapedtitle
|
||||
url = scrapedurl
|
||||
thumbnail = scrapedthumbnail.replace(" ", "%20")
|
||||
plot = ""
|
||||
|
||||
logger.debug("title=[" + title + "], url=[" + url + "], thumbnail=[" + thumbnail + "]")
|
||||
itemlist.append(Item(channel=item.channel, action="play", title=title, url=url, thumbnail=thumbnail, plot=plot,
|
||||
itemlist.append(Item(channel=item.channel, action="play", title=title, url=url, thumbnail=thumbnail,
|
||||
folder=False))
|
||||
|
||||
next_page_url = scrapertools.find_single_match(data, "<a href='([^']+)' class=\"next\">NEXT</a>")
|
||||
if next_page_url != "":
|
||||
url = urlparse.urljoin(item.url, next_page_url)
|
||||
itemlist.append(Item(channel=item.channel, action="videos", title=">> Página siguiente", url=url, folder=True,
|
||||
viewmode="movie"))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def play(item):
|
||||
logger.info()
|
||||
|
||||
data = scrapertools.cache_page(item.url)
|
||||
|
||||
media_url = scrapertools.find_single_match(data, 'file\:\s*"([^"]+)"')
|
||||
data = httptools.downloadpage(item.url).data
|
||||
media_url = "https:" + scrapertools.find_single_match(data, 'source src="([^"]+)"')
|
||||
itemlist = []
|
||||
itemlist.append(Item(channel=item.channel, action="play", title=item.title, fulltitle=item.fulltitle, url=media_url,
|
||||
thumbnail=item.thumbnail, plot=item.plot, show=item.title, server="directo", folder=False))
|
||||
|
||||
thumbnail=item.thumbnail, show=item.title, server="directo", folder=False))
|
||||
return itemlist
|
||||
|
||||
Reference in New Issue
Block a user