Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,8 @@ disable=raw-checker-failed,
deprecated-pragma,
use-symbolic-message-instead,
unrecognized-option,
missing-function-docstring
missing-function-docstring,
import-error
# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
# multiple time (only on the command line, not in the configuration file where
Expand Down
12 changes: 9 additions & 3 deletions module/scraper/scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,13 @@ def connect_db() -> sqlite3.Connection:
return db_connect


def add_to_db(title: str, article_time: str, article_link: str, cursor: sqlite3.Cursor, connect: sqlite3.Connection) -> None:
def add_to_db(
title: str,
article_time: str,
article_link: str,
cursor: sqlite3.Cursor,
connect: sqlite3.Connection
) -> None:
db_insert = "INSERT INTO Articles (Title, Time, URL) VALUES (?, ?, ?);"
db_data = (title, article_time, article_link)
cursor.execute(db_insert, db_data)
Expand Down Expand Up @@ -147,9 +153,9 @@ def scrape_table(list_of_articles: list, context: CallbackContext) -> None:


def publish_article(latest_article: tuple, context: CallbackContext) -> None:
[article_title, article_time, article_link,
[article_title, _, article_link,
article_tag, article_content] = latest_article
# print(article_title ,article_time , article_link , article_tag , article_content)
# print(article_title, article_time, article_link, article_tag, article_content)

message_content = f"<b>[{article_tag}]</b>"
message_content += "\n"
Expand Down