def main(): mydb = input_sql.conn_sql() func_map = {'udn': crawler_udn, 'udn_opinion': crawler_udn_opinion} udn_category = { 'udn': ['constellation', 'military'], 'udn_opinion': [ 'military', 'travel', ] } for func_key, category_list in udn_category.items(): for category in category_list: func_map.get(func_key, lambda db, key: None)(mydb, category)
def main(): mydb = input_sql.conn_sql() test(mydb, 'law')
def main(): mydb = input_sql.conn_sql() crawler_lehman(mydb, 'military')
def main(): mydb = input_sql.conn_sql() crawler_m01(mydb, 'travel')
def main(): mydb = input_sql.conn_sql() hotal_info(mydb, 'hotel')
def main(): mydb = input_sql.conn_sql() crawler_storm(mydb, 'military')
def main(): mydb = input_sql.conn_sql() crawler_upmedia(mydb, 'military')