|
@@ -7,7 +7,8 @@ import requests |
|
|
import re |
|
|
import re |
|
|
import sqlite3 |
|
|
import sqlite3 |
|
|
import html2text |
|
|
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'] |
|
|
dryrun = config['settings']['dryrun'] |
|
|
days = config['settings']['days'] |
|
|
days = config['settings']['days'] |
|
|
|
|
|
delay = config['settings']['delay'] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# sqlite db to store processed tweets (and corresponding toots ids) |
|
|
# 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('database execution failed.') |
|
|
print('p.id: ', p.id) |
|
|
print('p.id: ', p.id) |
|
|
print('toot.id: ', toot.id) |
|
|
print('toot.id: ', toot.id) |
|
|
|
|
|
|
|
|
else: |
|
|
else: |
|
|
print('Dryrun: not posting toot and not adding it to database') |
|
|
print('Dryrun: not posting toot and not adding it to database') |
|
|
|
|
|
print('waiting %s seconds ...' % delay) |
|
|
|
|
|
time.sleep(delay) |
|
|
print('------------------------') |
|
|
print('------------------------') |
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -287,5 +290,6 @@ for p in reversed(s.entries): |
|
|
print( '--> ', p.id, ' posted!') |
|
|
print( '--> ', p.id, ' posted!') |
|
|
else: |
|
|
else: |
|
|
print('Dryrun: not posting toot and not adding it to database') |
|
|
print('Dryrun: not posting toot and not adding it to database') |
|
|
|
|
|
|
|
|
|
|
|
print('waiting %s seconds ...' % delay) |
|
|
|
|
|
time.sleep(delay) |
|
|
print('------------------------') |
|
|
print('------------------------') |