Closed leorrose closed 2 years ago
you should write in this way
from GoogleNews import GoogleNews
googlenews = GoogleNews()
googlenews.get_news('APPLE')
results = googlenews.results()
print(results)
This you should use googlenews.results()
to get the result, googlenews.get_news('APPLE')
is not returned dataset, and it is only getting first page, if you want to get more than one page, you need to do like this,
from GoogleNews import GoogleNews
googlenews = GoogleNews()
googlenews.get_news('APPLE')
googlenews.get_page(2)
googlenews.get_page(3)
results = googlenews.results()
print(results)
If you only want to get specific page,
result = googlenews.page_at(2)
Problem: When trying to get news using the get_news method it returns None all the time.
Screenshot:![image](https://user-images.githubusercontent.com/44137602/143622307-e9fed70b-9148-4cc8-8e23-0ae74c5e1488.png)
Code for reproduce:
OS: windows 10
Python version: 3.8.7