fix cineblog01
This commit is contained in:
+14
-8
@@ -41,7 +41,8 @@ def mainlist(item):
|
|||||||
film = [
|
film = [
|
||||||
('HD', ['', 'menu', 'Film HD Streaming']),
|
('HD', ['', 'menu', 'Film HD Streaming']),
|
||||||
('Generi', ['', 'menu', 'Film per Genere']),
|
('Generi', ['', 'menu', 'Film per Genere']),
|
||||||
('Anni', ['', 'menu', 'Film per Anno'])
|
('Anni', ['', 'menu', 'Film per Anno']),
|
||||||
|
('Ultimi aggiornati', ['/lista-film-ultimi-100-film-aggiornati/', 'newest', 'aggiornati'])
|
||||||
]
|
]
|
||||||
tvshow = ['/serietv/',
|
tvshow = ['/serietv/',
|
||||||
('Per Lettera', ['/serietv/', 'menu', 'Serie-Tv per Lettera']),
|
('Per Lettera', ['/serietv/', 'menu', 'Serie-Tv per Lettera']),
|
||||||
@@ -65,12 +66,16 @@ def menu(item):
|
|||||||
@support.scrape
|
@support.scrape
|
||||||
def newest(categoria):
|
def newest(categoria):
|
||||||
findhost()
|
findhost()
|
||||||
debug = True
|
if type(categoria) != Item:
|
||||||
item = Item()
|
item = Item()
|
||||||
item.contentType = 'movie'
|
item.contentType = 'movie'
|
||||||
item.url = host + '/lista-film-ultimi-100-film-aggiunti/'
|
item.url = host + '/lista-film-ultimi-100-film-aggiunti/'
|
||||||
patron = "<a href=(?P<url>[^>]+)>(?P<title>[^<([]+)(?:\[(?P<quality>[A-Z]+)\])?\s\((?P<year>[0-9]{4})\)<\/a>"
|
patronBlock = r'Ultimi 100 film aggiunti:(?P<block>.*?)<\/td>'
|
||||||
patronBlock = r'Ultimi 100 film aggiunti:.*?<\/td>'
|
else:
|
||||||
|
patronBlock = r'Ultimi 100 film Aggiornati:(?P<block>.*?)<\/td>'
|
||||||
|
item = categoria
|
||||||
|
patron = "<a href=(?P<url>[^>]+)>(?P<title>[^<([]+)(?:\[(?P<lang>Sub-ITA|B/N)\])?\s?(?:\[(?P<quality>HD|SD|HD/3D)\])?\s?\((?P<year>[0-9]{4})\)<\/a>"
|
||||||
|
pagination = 20
|
||||||
|
|
||||||
return locals()
|
return locals()
|
||||||
|
|
||||||
@@ -93,11 +98,12 @@ def search(item, text):
|
|||||||
@support.scrape
|
@support.scrape
|
||||||
def peliculas(item):
|
def peliculas(item):
|
||||||
if '/serietv/' not in item.url:
|
if '/serietv/' not in item.url:
|
||||||
patron = r'<div class="?card-image"?>.*?<img src="?(?P<thumb>[^" ]+)"? alt.*?<a href="?(?P<url>[^" >]+)(?:\/|")>(?P<title>[^<[(]+)(?:\[(?P<quality>[A-Za-z0-9/-]+)])? (?:\((?P<year>[0-9]{4})\))?.*?<strong>(?P<genre>[^<>&]+).*?DURATA (?P<duration>[0-9]+).*?<br(?: /)?>(?P<plot>[^<>]+)'
|
patron = r'<div class="?card-image"?>.*?<img src="?(?P<thumb>[^" ]+)"? alt.*?<a href="?(?P<url>[^" >]+)(?:\/|")>(?P<title>[^<[(]+)(?:\[(?P<quality>[A-Za-z0-9/-]+)])? (?:\((?P<year>[0-9]{4})\))?.*?<strong>(?P<genre>[^<>&–]+).*?DURATA (?P<duration>[0-9]+).*?<br(?: /)?>(?P<plot>[^<>]+)'
|
||||||
action = 'findvideos'
|
action = 'findvideos'
|
||||||
else:
|
else:
|
||||||
patron = r'div class="card-image">.*?<img src="(?P<thumb>[^ ]+)" alt.*?<a href="(?P<url>[^ >]+)">(?P<title>[^<[(]+)<\/a>.*?<strong><span style="[^"]+">(?P<genre>[^<>0-9(]+)\((?P<year>[0-9]{4}).*?</(?:p|div)>(?P<plot>.*?)</div'
|
patron = r'div class="card-image">.*?<img src="(?P<thumb>[^ ]+)" alt.*?<a href="(?P<url>[^ >]+)">(?P<title>[^<[(]+)<\/a>.*?<strong><span style="[^"]+">(?P<genre>[^<>0-9(]+)\((?P<year>[0-9]{4}).*?</(?:p|div)>(?P<plot>.*?)</div'
|
||||||
action = 'episodios'
|
action = 'episodios'
|
||||||
|
item.contentType = 'tvshow'
|
||||||
|
|
||||||
# patronBlock=[r'<div class="?sequex-page-left"?>(?P<block>.*?)<aside class="?sequex-page-right"?>',
|
# patronBlock=[r'<div class="?sequex-page-left"?>(?P<block>.*?)<aside class="?sequex-page-right"?>',
|
||||||
# '<div class="?card-image"?>.*?(?=<div class="?card-image"?>|<div class="?rating"?>)']
|
# '<div class="?card-image"?>.*?(?=<div class="?card-image"?>|<div class="?rating"?>)']
|
||||||
|
|||||||
+1
-1
@@ -133,7 +133,7 @@ def regexDbg(item, patron, headers, data=''):
|
|||||||
'delimiter': '"""',
|
'delimiter': '"""',
|
||||||
'flavor': 'python'
|
'flavor': 'python'
|
||||||
}
|
}
|
||||||
r = urllib2.Request(url + '/api/regex', json.dumps(data), headers=headers)
|
r = urllib2.Request(url + '/api/regex', json.dumps(data, encoding='latin1'), headers=headers)
|
||||||
r = urllib2.urlopen(r).read()
|
r = urllib2.urlopen(r).read()
|
||||||
permaLink = json.loads(r)['permalinkFragment']
|
permaLink = json.loads(r)['permalinkFragment']
|
||||||
webbrowser.open(url + "/r/" + permaLink)
|
webbrowser.open(url + "/r/" + permaLink)
|
||||||
|
|||||||
Reference in New Issue
Block a user