fix buckler.link, novità tantifilm
This commit is contained in:
@@ -133,7 +133,7 @@ def search(item, texto):
|
||||
@support.scrape
|
||||
def newest(categoria):
|
||||
if categoria == 'series':
|
||||
item = Item(url=host + '/aggiornamenti-giornalieri-serie-tv-2')
|
||||
item = Item(url=host + '/aggiornamenti-giornalieri-serie-tv')
|
||||
data = support.match(item).data.replace('<u>','').replace('</u>','')
|
||||
item.contentType = 'episode'
|
||||
patronBlock = r'Aggiornamenti Giornalieri Serie TV.*?<div class="sp-body folded">(?P<block>.*?)</div>'
|
||||
|
||||
@@ -557,7 +557,7 @@ class UnshortenIt(object):
|
||||
if not link:
|
||||
link = re.findall('action="(?:[^/]+.*?/[^/]+/([a-zA-Z0-9_]+))">', r.data)
|
||||
if not link:
|
||||
link = scrapertools.find_single_match(r.data, r'a href="([^"]+)')
|
||||
link = scrapertools.find_single_match(r.data, '\$\("a\.redirect"\)\.attr\("href",\s*"(http[^"]+)')
|
||||
if link:
|
||||
uri = link
|
||||
short = re.findall('^https?://.*?(https?://.*)', uri)
|
||||
|
||||
@@ -1,14 +1,29 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# import re
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from platformcode import logger
|
||||
from platformcode import logger, config
|
||||
import codecs
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
global data
|
||||
data = httptools.downloadpage(page_url).data
|
||||
if 'File was deleted' in data:
|
||||
return False, config.get_localized_string(70449) % 'YouDbox'
|
||||
return True
|
||||
|
||||
|
||||
def get_video_url(page_url, video_password):
|
||||
logger.debug("(page_url='%s')" % page_url)
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
global data
|
||||
video_urls = []
|
||||
data = httptools.downloadpage(page_url).data
|
||||
url = scrapertools.find_single_match(data, '<source src="([^"]+)"')
|
||||
list = scrapertools.find_single_match(data, 'var [a-zA-Z0-9]+ = ([^\]]+)').replace('[', '').replace('"', '').replace('\\x', '').replace(',', ' ')
|
||||
list = list.split()[::-1]
|
||||
url =""
|
||||
for elem in list:
|
||||
decoded = codecs.decode(elem, "hex")
|
||||
url += decoded.decode("utf8")
|
||||
url = scrapertools.find_single_match(url, '<source src="([^"]+)"')
|
||||
video_urls.append(["[youdbox]", url])
|
||||
return video_urls
|
||||
|
||||
return video_urls
|
||||
Reference in New Issue
Block a user