diff --git a/GoogleNews/__init__.py b/GoogleNews/__init__.py index 61abd9f..fb0fa00 100644 --- a/GoogleNews/__init__.py +++ b/GoogleNews/__init__.py @@ -82,7 +82,7 @@ def __init__(self,lang="en",period="",start="",end="",encode="utf-8",region=None self.__end = end self.__encode = encode self.__exception = False - self.__version = '1.6.12' + self.__version = '1.6.13' def getVersion(self): return self.__version @@ -284,7 +284,7 @@ def get_news(self, key="",deamplify=False): try: # title try: - title=article.findAll('div')[2].text + title=article.findAll('div')[2].findAll('a')[0].text except: title=None # description diff --git a/setup.py b/setup.py index f7611aa..cfc26ee 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="GoogleNews", - version="1.6.12", + version="1.6.13", author="Hurin Hu", author_email="hurin@live.ca", description="Google News search for Python", diff --git a/test/test_search.py b/test/test_search.py index c594169..b4846b8 100644 --- a/test/test_search.py +++ b/test/test_search.py @@ -51,7 +51,7 @@ class TestStringMethods(unittest.TestCase): def testVersion(self): googlenews = GoogleNews() - version = '1.6.12' + version = '1.6.13' self.assertIn(version, googlenews.getVersion()) print('Latest version matched')