19 lines
344 B
Python
19 lines
344 B
Python
|
import json
|
||
|
import datetime
|
||
|
import sqlite3
|
||
|
|
||
|
from classes.database import Database
|
||
|
from classes.api import RomeoAPI
|
||
|
|
||
|
try:
|
||
|
from settings import USERNAME, PASSWORD
|
||
|
except:
|
||
|
USERNAME, PASSWORD = None, None
|
||
|
|
||
|
api = RomeoAPI(True, USERNAME, PASSWORD)
|
||
|
db = Database()
|
||
|
|
||
|
db.create_tables()
|
||
|
|
||
|
for message in api.messages():
|
||
|
message.to_database()
|