SpiffyTitles: fixes #34 - can't find title on some websites

This commit is contained in:
PrgmrBill 2015-04-25 19:02:19 -04:00
parent cae4038fdd
commit 35f71d7a57
1 changed files with 2 additions and 3 deletions

View File

@ -518,7 +518,7 @@ class SpiffyTitles(callbacks.Plugin):
if soup is not None:
# TODO: What should happen if there is more than one <title> tag?
title = head.find("title")
title = soup.find("title")
if title is not None:
title_text = title.get_text()
@ -539,8 +539,7 @@ class SpiffyTitles(callbacks.Plugin):
headers = {
"User-Agent": agent,
"Accept-Language": ";".join((self.accept_language, "q=1.0")),
"Accept": "text/html;q=1.0"
"Accept-Language": ";".join((self.accept_language, "q=1.0"))
}
self.log.info("SpiffyTitles: requesting %s" % (url))