|
|
@@ -7,7 +7,8 @@ import requests |
|
|
|
import re |
|
|
|
import sqlite3 |
|
|
|
import html2text |
|
|
|
from datetime import datetime, date, time, timedelta |
|
|
|
import time |
|
|
|
from datetime import datetime, date, timedelta |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -34,6 +35,7 @@ soupuser = config['sources']['soup']['user'] |
|
|
|
|
|
|
|
dryrun = config['settings']['dryrun'] |
|
|
|
days = config['settings']['days'] |
|
|
|
delay = config['settings']['delay'] |
|
|
|
|
|
|
|
|
|
|
|
# sqlite db to store processed tweets (and corresponding toots ids) |
|
|
@@ -157,9 +159,10 @@ for p in reversed(t.entries): |
|
|
|
print('database execution failed.') |
|
|
|
print('p.id: ', p.id) |
|
|
|
print('toot.id: ', toot.id) |
|
|
|
|
|
|
|
else: |
|
|
|
print('Dryrun: not posting toot and not adding it to database') |
|
|
|
print('waiting %s seconds ...' % delay) |
|
|
|
time.sleep(delay) |
|
|
|
print('------------------------') |
|
|
|
|
|
|
|
|
|
|
@@ -287,5 +290,6 @@ for p in reversed(s.entries): |
|
|
|
print( '--> ', p.id, ' posted!') |
|
|
|
else: |
|
|
|
print('Dryrun: not posting toot and not adding it to database') |
|
|
|
|
|
|
|
print('waiting %s seconds ...' % delay) |
|
|
|
time.sleep(delay) |
|
|
|
print('------------------------') |