爬取字段,公司名称,职位名称,公司详情的链接,薪资待遇,要求的工作经验年限 1,items中定义爬取字段 import scrapy class ZhilianzhaopinItem(scrapy.Item): # define the fields for your item here like: # name = scrapy.Field() company_name = scrapy.Field() jobName = scrapy.Field() company_url = scrapy
import requests from lxml import html import time import pandas as pd from sqlalchemy import create_engine import traceback from fake_useragent import UserAgent as UA #使用其random方法获取随机ua class ZhaoPinSpider: def __init__(self): #http://sou.zhaopin.com