Example #1
0
def main():
    global my_headers
    my_headers = com_tools.get_mayi_Headers()
    for i in range(com_tools.tag_thread_num):
        t = threading.Thread(target=process, name='look_my_header')
        t.start()
        t.join(0.1)
Example #2
0
def main():
    global my_headers
    my_headers = com_tools.get_mayi_Headers()

    st = time.time()
    thread_start()
    ed = time.time()
    print(ed - st)
Example #3
0
def look_my_header():
    """
    监控蚂蚁的header   半小时更新一次
    :return:
    """
    while True:
        time.sleep(60 * 30)
        global my_headers
        my_headers = com_tools.get_mayi_Headers()
Example #4
0
def look_my_header():
    """
    监控蚂蚁的header  半小时更新一次
    :return:
    """
    for i in range(8):
        time.sleep(60 * 30)
        global my_headers
        my_headers = com_tools.get_mayi_Headers()
Example #5
0
def start():
    global my_headers
    my_headers = com_tools.get_mayi_Headers()

    # t = threading.Thread(target=look_my_header, name='look_my_header')
    # t.start()
    # t.join(0.1)

    crawl_city()
    crawl_bc()
Example #6
0
def main():
    # while True:
    #     try:
    #         run()
    #     except Exception as e:
    #         print(e)
    set_room_queue()
    mayi_Headers = com_tools.get_mayi_Headers()
    time.sleep(60)
    start(mayi_Headers)
Example #7
0
 def __init__(self):
     """{"lodge_id": row.lodge_id, "room_id": row.room_id,
         "third_type": row.third_type, "state": row.state,
         "city": row.short_name}"""
     self.all_room_queue = com_tools.get_all_room_queue()
     self.my_headers = com_tools.get_mayi_Headers()