Skip to content

Commit

Permalink
Merge 22d98fa into b849485
Browse files Browse the repository at this point in the history
  • Loading branch information
HurinHu committed Aug 21, 2022
2 parents b849485 + 22d98fa commit 0d22d43
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions GoogleNews/__init__.py
Expand Up @@ -79,7 +79,7 @@ def __init__(self,lang="en",period="",start="",end="",encode="utf-8",region=None
self.__start = start
self.__end = end
self.__encode = encode
self.__version = '1.6.4'
self.__version = '1.6.5'

def getVersion(self):
return self.__version
Expand Down Expand Up @@ -136,7 +136,7 @@ def build_response(self):
else:
#TODO might want to add output for user to know no data was found
return
result = self.content.find_all("div", id="search")[0].find("div", id="rso").children
result = self.content.find_all("a",{"jsname" : re.compile(r".*")})[3:-1]
return result

def page_at(self, page=1):
Expand Down Expand Up @@ -164,7 +164,7 @@ def page_at(self, page=1):
except Exception:
tmp_text = ''
try:
tmp_link = item.find("a").get("href")
tmp_link = item.get("href")
except Exception:
tmp_link = ''
try:
Expand Down Expand Up @@ -218,7 +218,7 @@ def get_page(self, page=1):
except Exception:
tmp_text = ''
try:
tmp_link = item.find("a").get("href")
tmp_link = item.get("href")
except Exception:
tmp_link = ''
try:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="GoogleNews",
version="1.6.4",
version="1.6.5",
author="Hurin Hu",
author_email="hurin@live.ca",
description="Google News search for Python",
Expand Down
2 changes: 1 addition & 1 deletion test/test_search.py
Expand Up @@ -51,7 +51,7 @@ class TestStringMethods(unittest.TestCase):

def testVersion(self):
googlenews = GoogleNews()
version = '1.6.4'
version = '1.6.5'
self.assertIn(version, googlenews.getVersion())
print('Latest version matched')

Expand Down

0 comments on commit 0d22d43

Please sign in to comment.