fix buckler.link, novità tantifilm
This commit is contained in:
@@ -133,7 +133,7 @@ def search(item, texto):
|
|||||||
@support.scrape
|
@support.scrape
|
||||||
def newest(categoria):
|
def newest(categoria):
|
||||||
if categoria == 'series':
|
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>','')
|
data = support.match(item).data.replace('<u>','').replace('</u>','')
|
||||||
item.contentType = 'episode'
|
item.contentType = 'episode'
|
||||||
patronBlock = r'Aggiornamenti Giornalieri Serie TV.*?<div class="sp-body folded">(?P<block>.*?)</div>'
|
patronBlock = r'Aggiornamenti Giornalieri Serie TV.*?<div class="sp-body folded">(?P<block>.*?)</div>'
|
||||||
|
|||||||
+1
-1
@@ -557,7 +557,7 @@ class UnshortenIt(object):
|
|||||||
if not link:
|
if not link:
|
||||||
link = re.findall('action="(?:[^/]+.*?/[^/]+/([a-zA-Z0-9_]+))">', r.data)
|
link = re.findall('action="(?:[^/]+.*?/[^/]+/([a-zA-Z0-9_]+))">', r.data)
|
||||||
if not link:
|
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:
|
if link:
|
||||||
uri = link
|
uri = link
|
||||||
short = re.findall('^https?://.*?(https?://.*)', uri)
|
short = re.findall('^https?://.*?(https?://.*)', uri)
|
||||||
|
|||||||
+20
-5
@@ -1,14 +1,29 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
# import re
|
||||||
from core import httptools
|
from core import httptools
|
||||||
from core import scrapertools
|
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):
|
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 = []
|
video_urls = []
|
||||||
data = httptools.downloadpage(page_url).data
|
list = scrapertools.find_single_match(data, 'var [a-zA-Z0-9]+ = ([^\]]+)').replace('[', '').replace('"', '').replace('\\x', '').replace(',', ' ')
|
||||||
url = scrapertools.find_single_match(data, '<source src="([^"]+)"')
|
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])
|
video_urls.append(["[youdbox]", url])
|
||||||
return video_urls
|
return video_urls
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user