Пример #1
0
def _slots_logo():
    """
    Copy slots logo images
    """
    c.execute("""SELECT id, screenshot FROM casino_game WHERE screenshot<>'' ORDER BY id ASC""")
    for item in c.fetchall():
        filename = copy_file("http://casino-rating.org/%s" % item["screenshot"], "slots", 
            get_file_extension(item["screenshot"]))
        c.execute("""UPDATE casino_game SET screenshot=%s WHERE id=%s""", (filename, item["id"]))
    conn_new.commit()
Пример #2
0
def _casino_screenshots():
    """
    Copy casino screenshots
    """
    c.execute("""SELECT id, casino_id, image FROM old_site_casinoscreenshot WHERE image<>'' ORDER BY id ASC""")
    for item in c.fetchall():
        filename = copy_file("http://casino-rating.org/images/logos/%s" % item["image"], "casino", 
            get_file_extension(item["image"]))
        c.execute("""UPDATE old_site_casinoscreenshot SET image=%s WHERE id=%s""", (filename, item["id"]))
    conn_new.commit()