findhost in channels.json

This commit is contained in:
marco
2020-10-09 20:15:04 +02:00
parent 454ef459f5
commit 3d39fbf4fa
20 changed files with 102 additions and 108 deletions
+2 -2
View File
@@ -5,8 +5,8 @@
from core import support
def findhost():
data = support.httptools.downloadpage('https://lagazzettadelcorsaro.com/').data
def findhost(url):
data = support.httptools.downloadpage(url).data
url = support.scrapertools.find_single_match(data, '<li><a href="([^"]+)')
return url[:-1] if url.endswith('/') else url