爬虫调度器
# coding:utf-8
from pip._vendor.distlib.compat import raw_input
from spider_mb import url_manager, html_downloader, html_parser, html_outputer, xh_generate
import time
class SpiderMain(object):
def __init__(self):
self.urls = url_manager.UrlManager()
self.downloader = html_downloader.HtmlDownloader()
self.parser = html_parser.HtmlParser()
self.output = html_outputer.HtmlOutputer()
self.xh = xh_generate.Xh_generate()
def craw(self, root_url):
raw_input("欢迎使用高校现代化教学管理系统")
tbYHM = raw_input("请输入学号:")
tbPSW = raw_input("请输入密码:")
ddlSF = raw_input("请输入身份:")
xsmainfs, session = self.downloader.jw_login(root_url, tbYHM, tbPSW, ddlSF)
alert = self.parser.login(xsmainfs)
if len(alert) == 0:
xsxx, xscj, djkscjcx1, ryxk, xstop = self.d