Ejemplo n.º 1
0
def newsCrawl_4():      
    kankan.main()
    merge.mergeTable('kankan')
#     merge.main()
    print 'Main thread begins to sleep at time %s' %(timeformat.getTimeStamp(),)

# @sched.cron_schedule(hour='*',minute='*/30',second='31')
# def newsCrawl():  
#     call_async_3()
#     merge.main()
#     print 'Main thread begins to sleep at time %s' %(timeformat.getTimeStamp(),)

# def call_sync():
#     oldtime=time.time()
#     china.main()
#     ifeng.main()
#     kankan.main()
#     qq.main_dummy()
#     sina.main()
#     sohu.main()
#     v1.main()
#     msg='Total time cost: %s (seconds)' % (time.time()-oldtime,)     
#     print msg  
#     log.info(msg) 
# 
# if __name__=='__main__':
#     while True:
#         call_sync()
#         merge.main()
#         print 'Main thread begins to sleep at time %s' %(timeformat.getTimeStamp(),)
#         time.sleep(1800)
        
Ejemplo n.º 2
0
def newsCrawl_2():
    v1.main()
    qq.main_dummy()
    merge.mergeTable('v1')
    merge.mergeTable('qq')
Ejemplo n.º 3
0
def newsCrawl_3():     
    china.main()
    ifeng.main()
    merge.mergeTable('china')
    merge.mergeTable('ifeng')
Ejemplo n.º 4
0
def newsCrawl_1():
    sina.main()
    sohu.main()
    merge.mergeTable('sina')
    merge.mergeTable('sohu')