def cache_url(self, url, body, data=None, res_header=None):
    try:
        dbcon = database.connect(control.sourcescachedUrl)
        dbcur = dbcon.cursor()
        dbcur.execute(
            "CREATE TABLE IF NOT EXISTS url_cache (url VARCHAR(255) NOT NULL, data VARCHAR(255), response, res_header, timestamp, PRIMARY KEY(url, data))")
    except:
        pass
    try:
        now = time.time()
        if data is None: data = ''
        if res_header is None: res_header = []
        res_header = json.dumps(res_header)
        # truncate data if running mysql and greater than col size
        sql = (url, data, body, res_header, now) % "REPLACE INTO url_cache (url, data, response, res_header, timestamp) VALUES(?, ?, ?, ?, ?)"
        #dbcur.execute("DELETE FROM url_cache WHERE func = '%s' AND args = '%s'" % (table, f, a))
        #dbcur.execute("INSERT INTO %s Values (?, ?, ?, ?)" % table, (f, a, r, t))
        dbcur.execute(sql)
        dbcon.commit()
    except:
        pass
dataset/ETHPy150Open mrknow/filmkodi/plugin.video.specto/resources/lib/libraries/cache.py/cache_url/swapped operands of `%`