30-08-2023, 06:06 PM
Fix dla zaluknijcc niemogącego znaleźć nowych odcinków mimo, że są dostępne na stronie
plik: plugin.video.fanfilm\resources\lib\sources\pl\zaluknijcc.py
Linia 76 w wersji 01.08.2023
Cała funkcja:
def do_search(self, title, year, type_):
search_url = f'{self.search_link}{title}'
html = self.sess.get(search_url, headers=self.headers2, timeout=15, verify=False).text
fout = []
sout = []
results = []
out_url = ''
links = parseDOM(html, 'div', attrs={'id': 'advanced-search'})[0]
links = parseDOM(links, 'div', attrs={'class': r'col-sm-\d+'})
for link in links:
if 'href' in link:
href = parseDOM(link, 'a', ret='href')[0]
tytul = parseDOM(link, 'div', attrs={'class': 'title'})[0]
if 'serial-online' in href or 'seasons' in href:
sout.append({'title': tytul, 'url': href})
else:
fout.append({'title': tytul, 'url': href})
if type_ == 'movie':
results = fout
if type_ == 'tvshow':
results = sout
results.sort(key=lambda k: len(k['title']), reverse=True)
for url in results:
date = ''
if type_ == 'movie':
date = str(url['url'])[-4:]
if type_ == 'tvshow':
html = self.sess.get(url['url'], headers=self.headers2, timeout=15, verify=False).text
date = parseDOM(html, 'div', attrs={'class': 'info'})
date = (parseDOM(date, 'li')[-1:])[0]
if year and year != '0':
if (int(date) == int(year)):
out_url = url['url']
else:
out_url = url['url']
return out_url
plik: plugin.video.fanfilm\resources\lib\sources\pl\zaluknijcc.py
Linia 76 w wersji 01.08.2023
if year and year != '0':
Cała funkcja:
def do_search(self, title, year, type_):
search_url = f'{self.search_link}{title}'
html = self.sess.get(search_url, headers=self.headers2, timeout=15, verify=False).text
fout = []
sout = []
results = []
out_url = ''
links = parseDOM(html, 'div', attrs={'id': 'advanced-search'})[0]
links = parseDOM(links, 'div', attrs={'class': r'col-sm-\d+'})
for link in links:
if 'href' in link:
href = parseDOM(link, 'a', ret='href')[0]
tytul = parseDOM(link, 'div', attrs={'class': 'title'})[0]
if 'serial-online' in href or 'seasons' in href:
sout.append({'title': tytul, 'url': href})
else:
fout.append({'title': tytul, 'url': href})
if type_ == 'movie':
results = fout
if type_ == 'tvshow':
results = sout
results.sort(key=lambda k: len(k['title']), reverse=True)
for url in results:
date = ''
if type_ == 'movie':
date = str(url['url'])[-4:]
if type_ == 'tvshow':
html = self.sess.get(url['url'], headers=self.headers2, timeout=15, verify=False).text
date = parseDOM(html, 'div', attrs={'class': 'info'})
date = (parseDOM(date, 'li')[-1:])[0]
if year and year != '0':
if (int(date) == int(year)):
out_url = url['url']
else:
out_url = url['url']
return out_url