import config as cfg
from tinydb import TinyDB, Query
# from operator import itemgetter
import datetime


def set_expire():
    db = TinyDB('db.json')
    Record = Query()
    for record in db.all():
        if 'timestamp_epoch' not in record:
            date_object = datetime.datetime.strptime(record['pubdate_api'], '%Y-%m-%dT%H:%M:%S')
            timestamp_epoch = int((date_object - datetime.datetime(1970, 1, 1)).total_seconds())
            db.update({'timestamp_epoch': timestamp_epoch}, Record.asset_id == record['asset_id'])


set_expire()

2fcba1040a811a64d84f8d20565fe9aac821c58d
<mask token>

<mask token>


def set_expire():
    db = TinyDB('db.json')
    Record = Query()
    for record in db.all():
        if 'timestamp_epoch' not in record:
            date_object = datetime.datetime.strptime(record['pubdate_api'],
                '%Y-%m-%dT%H:%M:%S')
            timestamp_epoch = int((date_object - datetime.datetime(1970, 1,
                1)).total_seconds())
            db.update({'timestamp_epoch': timestamp_epoch}, Record.asset_id ==
                record['asset_id'])


<mask token>

<mask token>


def set_expire():
    db = TinyDB('db.json')
    Record = Query()
    for record in db.all():
        if 'timestamp_epoch' not in record:
            date_object = datetime.datetime.strptime(record['pubdate_api'],
                '%Y-%m-%dT%H:%M:%S')
            timestamp_epoch = int((date_object - datetime.datetime(1970, 1,
                1)).total_seconds())
            db.update({'timestamp_epoch': timestamp_epoch}, Record.asset_id ==
                record['asset_id'])


set_expire()

import config as cfg
from tinydb import TinyDB, Query
import datetime


def set_expire():
    db = TinyDB('db.json')
    Record = Query()
    for record in db.all():
        if 'timestamp_epoch' not in record:
            date_object = datetime.datetime.strptime(record['pubdate_api'],
                '%Y-%m-%dT%H:%M:%S')
            timestamp_epoch = int((date_object - datetime.datetime(1970, 1,
                1)).total_seconds())
            db.update({'timestamp_epoch': timestamp_epoch}, Record.asset_id ==
                record['asset_id'])


set_expire()

import config as cfg
from tinydb import TinyDB, Query
# from operator import itemgetter
import datetime


def set_expire():
    db = TinyDB('db.json')
    Record = Query()
    for record in db.all():
        if 'timestamp_epoch' not in record:
            date_object = datetime.datetime.strptime(record['pubdate_api'], '%Y-%m-%dT%H:%M:%S')
            timestamp_epoch = int((date_object - datetime.datetime(1970, 1, 1)).total_seconds())
            db.update({'timestamp_epoch': timestamp_epoch}, Record.asset_id == record['asset_id'])


set_expire()
