资源简介

#coding=utf-8 import requests import re from selenium import webdriver url = 'https://search.51job.com/list/020000,000000,0000,00,9,99,pmc,2,%d.html?lang=c&stype=1&postchannel=0000&workyear=99&cotype=99&degreefrom=99&jobterm=99&companysize=99&lonlat=0%,0&radius=-1&ord_field=0&confirmdate=9&fromType

资源截图

代码片段和文件信息

#coding=utf-8
import requests
import re
from selenium import webdriver

url = ‘https://search.51job.com/list/020000000000000000999pmc2%d.html?lang=c&stype=1&postchannel=0000&workyear=99&cotype=99°reefrom=99&jobterm=99&companysize=99&lonlat=0%%2C0&radius=-1&ord_field=0&confirmdate=9&fromType=&dibiaoid=0&address=&line=&specialarea=00&from=&welfare=‘


driver = webdriver.Chrome()

page_start = 28
page_end = 35
f=open(‘D:\\ppp1.txt‘‘w‘encoding=‘utf-8‘)

while page_start<=page_end:
    driver.get(url%page_start)
    txt = driver.page_source
    end = 0
    while 1:
        found = re.search(‘‘ txt[end:])
        if found != None:
            start = found.span()[1]+end
            start = re.search(‘tle=“‘txt[start:]).span

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件        1929  2018-12-06 22:41  get_pmc_in_shanghai_from_51job.py

评论

共有 条评论

相关资源