-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1666575
commit 86d7128
Showing
7 changed files
with
95 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
from _typeshed import Incomplete | ||
from gnews.utils.constants import ( | ||
AVAILABLE_COUNTRIES as AVAILABLE_COUNTRIES, | ||
AVAILABLE_LANGUAGES as AVAILABLE_LANGUAGES, | ||
BASE_URL as BASE_URL, | ||
TOPICS as TOPICS, | ||
USER_AGENT as USER_AGENT, | ||
) | ||
from gnews.utils.utils import ( | ||
connect_database as connect_database, | ||
post_database as post_database, | ||
process_url as process_url, | ||
) | ||
|
||
logger: Incomplete | ||
|
||
class GNews: | ||
countries: Incomplete | ||
languages: Incomplete | ||
def __init__( | ||
self, | ||
language: str = "en", | ||
country: str | None = "US", | ||
max_results: int = 100, | ||
period: Incomplete | None = None, | ||
start_date: Incomplete | None = None, | ||
end_date: Incomplete | None = None, | ||
exclude_websites: Incomplete | None = None, | ||
proxy: Incomplete | None = None, | ||
) -> None: ... | ||
@property | ||
def language(self): ... | ||
@language.setter | ||
def language(self, language) -> None: ... | ||
@property | ||
def exclude_websites(self): ... | ||
@exclude_websites.setter | ||
def exclude_websites(self, exclude_websites) -> None: ... | ||
@property | ||
def max_results(self): ... | ||
@max_results.setter | ||
def max_results(self, size) -> None: ... | ||
@property | ||
def period(self): ... | ||
@period.setter | ||
def period(self, period) -> None: ... | ||
@property | ||
def start_date(self): ... | ||
@start_date.setter | ||
def start_date(self, start_date) -> None: ... | ||
@property | ||
def end_date(self): ... | ||
@end_date.setter | ||
def end_date(self, end_date) -> None: ... | ||
@property | ||
def country(self): ... | ||
@country.setter | ||
def country(self, country) -> None: ... | ||
def get_full_article(self, url): ... | ||
def docstring_parameter(*sub): ... | ||
indent: str | ||
indent2: Incomplete | ||
standard_output: Incomplete | ||
def get_news(self, key): ... | ||
def get_top_news(self): ... | ||
def get_news_by_topic(self, topic: str): ... | ||
def get_news_by_location(self, location: str): ... | ||
def get_news_by_site(self, site: str): ... | ||
def store_in_mongodb(self, news) -> None: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from _typeshed import Incomplete | ||
|
||
USER_AGENTS: Incomplete | ||
USER_AGENT: Incomplete | ||
AVAILABLE_LANGUAGES: Incomplete | ||
AVAILABLE_COUNTRIES: Incomplete | ||
GOOGLE_NEWS_URL: str | ||
BASE_URL: Incomplete | ||
GOOGLE_NEWS_REGEX: str | ||
TOPICS: Incomplete |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from gnews.utils.constants import ( | ||
AVAILABLE_COUNTRIES as AVAILABLE_COUNTRIES, | ||
AVAILABLE_LANGUAGES as AVAILABLE_LANGUAGES, | ||
GOOGLE_NEWS_REGEX as GOOGLE_NEWS_REGEX, | ||
) | ||
|
||
def lang_mapping(lang): ... | ||
def country_mapping(country): ... | ||
def connect_database(db_user, db_pw, db_name, collection_name): ... | ||
def post_database(collection, news) -> None: ... | ||
def process_url(item, exclude_websites): ... |