def resolve_title(url):
#grab the first title if there's more than one
try:
pnk_log(mod, "Requesting %s" % url)
r = pnk_request(url)
response_text = r.text
for title in BeautifulSoup(response_text, 'html.parser', parse_only=SoupStrainer('title')):
return title.text.strip()
except:
return None
评论列表
文章目录