def get_whitelist_id(cur, page_title):
    page_title = dbcon.escape_string(page_title)
    cur.execute("SELECT whitelist_id FROM ec_whitelist_content WHERE page_title = '" + str(page_title) + "'")
    if(cur.rowcount > 0):
        row = cur.fetchone()
        return row[0]
    else:
        return -1
def get_page_id(cur, page_title):
    page_title = dbcon.escape_string(page_title)
    cur.execute("SELECT page_id FROM ec_wikipage WHERE page_namespace = 0 AND page_title = '" + str(page_title) + "'")
    if(cur.rowcount > 0):
        row = cur.fetchone()
        return row[0]
    else:
        return -1