From 35f71d7a571b669765287c55ea6b9a7a4d644021 Mon Sep 17 00:00:00 2001 From: PrgmrBill Date: Sat, 25 Apr 2015 19:02:19 -0400 Subject: [PATCH] SpiffyTitles: fixes #34 - can't find title on some websites --- plugin.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plugin.py b/plugin.py index 917030b..175fcde 100644 --- a/plugin.py +++ b/plugin.py @@ -518,7 +518,7 @@ class SpiffyTitles(callbacks.Plugin): if soup is not None: # TODO: What should happen if there is more than one 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))