|
|
@@ -24,8 +24,8 @@ try: |
|
|
|
config = json.load(open(configpath)) |
|
|
|
|
|
|
|
except: |
|
|
|
print("didn't find config file: ", configpath) |
|
|
|
print("ERROR: Config file not found!") |
|
|
|
print("Problem reading config file: ", configpath) |
|
|
|
print("ERROR: Config file not found or invalid!") |
|
|
|
sys.exit(1) |
|
|
|
|
|
|
|
|
|
|
@@ -192,13 +192,13 @@ for p in reversed(s.entries): |
|
|
|
last = db.fetchone() |
|
|
|
|
|
|
|
print('Processing: %s' % p.id) |
|
|
|
|
|
|
|
shouldpost = True |
|
|
|
|
|
|
|
if last is not None: |
|
|
|
shouldpost = False |
|
|
|
print("skip: already posted") |
|
|
|
# process only unprocessed tweets less than n days old |
|
|
|
|
|
|
|
shouldpost = True |
|
|
|
|
|
|
|
posttime = datetime(p.published_parsed.tm_year, p.published_parsed.tm_mon, p.published_parsed.tm_mday, p.published_parsed.tm_hour, p.published_parsed.tm_min, p.published_parsed.tm_sec) |
|
|
|
age = datetime.now() - posttime |
|
|
|
if age > timedelta(days=days): |
|
|
|