Exemplo n.º 1
0
def crawl():
    Crawler.initialize_workbook()
    JiaoWuChu().crawl()
    # XueShengChu().crawl()
    # JiuYeChuangYe_TongZhi().crawl()
    # JiuYeChuangYe_JiuYe().crawl()
    # JiuYeChuangYe_ShiXi().crawl()
    # JiuYeChuangYe_ZhuanChangZhaoPinHui().crawl()
    # DangWei().crawl()
    Crawler.save_workbook()
Exemplo n.º 2
0
def website_crawler():
    Crawler.initialize_workbook()
    chan_pin_jing_li.crawl()
    chuang_ye_bang.crawl()
    do_news.crawl()
    # gui_gu_mi_tan.crawl()
    hu_lian_wang_de_yi_xie_shi.crawl()
    hu_xiu.crawl()
    hua_er_jie_jian_wen.crawl()
    ji_ke_wang.crawl()
    jie_mian.crawl()
    jing_li_ren_fen_xiang.crawl()
    ju_shuo_she.crawl()
    # ke_ji_lie.crawl()
    kr.crawl()
    lie_yun_wang.crawl()
    mi_ke_wang.crawl()
    pin_wan.crawl()
    pin_tu.crawl()
    tai_mei_ti.crawl()
    xiao_bai_chuang_ye.crawl()
    she_hui_website.crawl()
    Crawler.save_workbook()
    # Crawler.is_article_dir_exists = 0   # 设置状态为0,下次启动时重新创建文件夹
    # send_mail(Crawler.write_file_path)
    article_path_dir, article_target_dir = get_dir(Crawler.write_article_path)
    os.chdir(article_path_dir)
    os.system("tar -czvf result2.tar.gz %s" % article_target_dir)
    src = article_path_dir + "/result2.tar.gz"
    target = "/home/jfqiao/result/"
    transfer_file(src, target, host, user, password)
    os.system("rm -rf %s/result2.tar.gz" % article_path_dir)
    image_path_dir, image_target_dir = get_dir(Crawler.write_image_path)
    os.chdir(image_path_dir)
    os.system("tar -czvf result3.tar.gz %s" % image_target_dir)
    src = image_path_dir + "/result3.tar.gz"
    transfer_file(src, target, host, user, password)
    os.system("rm -rf %s/result3.tar.gz" % image_path_dir)
Exemplo n.º 3
0
from website_crawler import mi_ke_wang
from website_crawler import pin_tu
from website_crawler import pin_wan
from website_crawler import tai_mei_ti
from website_crawler import xiao_bai_chuang_ye

from website_crawler.crawler import Crawler

if __name__ == "__main__":
    Crawler.initialize_workbook()
    chan_pin_jing_li.crawl()
    chuang_ye_bang.crawl()
    do_news.crawl()
    # gui_gu_mi_tan.crawl()
    hu_lian_wang_de_yi_xie_shi.crawl()
    hu_xiu.crawl()
    hua_er_jie_jian_wen.crawl()
    ji_ke_wang.crawl()
    jie_mian.crawl()
    jing_li_ren_fen_xiang.crawl()
    ju_shuo_she.crawl()
    # ke_ji_lie.crawl()
    kr.crawl()
    lie_yun_wang.crawl()
    mi_ke_wang.crawl()
    pin_wan.crawl()
    pin_tu.crawl()
    tai_mei_ti.crawl()
    xiao_bai_chuang_ye.crawl()
    Crawler.save_workbook()