- Arrange the rss feed - The articles are listed in chronological order - Test the doublon for new article
25 lines
579 B
Python
25 lines
579 B
Python
from flask import Flask
|
|
import sqlite3
|
|
import string
|
|
import time
|
|
|
|
app = Flask( 'pywallter' )
|
|
app.config.from_pyfile('config.py')
|
|
|
|
|
|
DATABASE = app.config['DATABASE']
|
|
DOSSIER_PERSO = app.config['DOSSIER_APP']
|
|
DATABASE = app.config['DATABASE']
|
|
|
|
|
|
|
|
def article_exist(title_id : str, author : str ) -> bool:
|
|
conn = sqlite3.connect(DATABASE)
|
|
cursor = conn.cursor()
|
|
cursor.execute("""SELECT title FROM Blog_posts WHERE title_id=? AND author=?""", (title_id, author))
|
|
article = cursor.fetchone()
|
|
if article != None:
|
|
return True
|
|
else:
|
|
return False
|