import requests import json import re import csv import threadpool import time, random from bs4 import BeautifulSoup from fake_useragent import UserAgent def hotel(city_letter, city_num, city_name): with open('has_address.json', 'a+', encoding="utf-8
1.定义爬取的字段items.py # -*- coding: utf-8 -*- # Define here the models for your scraped items # # See documentation in: # https://doc.scrapy.org/en/latest/topics/items.html import scrapy class GosuncnItem(scrapy.Item): """ 定义爬虫的字段 ""&
针对这种招聘信息,使用crawlscrapy很适合. 1.settings.py # -*- coding: utf-8 -*- # Scrapy settings for gosuncn project # # For simplicity, this file contains only settings considered important or # commonly used. You can find more settings consulting the documentati