def get_search_url(opts): # SF_1_1_27=0为中文简历 SF_1_1_27=1为英文简历, 但是从js看并不能搜英文的. b = BasicRequests() # surl = 'http://rdsearch.zhaopin.com/Home/ResultForCustom?SF_1_1_7=7,9&orderBy=DATE_MODIFIED,1&pageSize=60&SF_1_1_27=0&exclude=1' surl = 'http://rdsearch.zhaopin.com/Home/ResultForCustom?SF_1_1_7=8,9&orderBy=DATE_MODIFIED,1&pageSize=60&SF_1_1_27=0&exclude=1' for name, value in opts.items(): surl = b.compose_url(surl, name, value) return surl
def sub_pages(url, con): count = CVZhilianUtil.get_count(url, con) if count > 4000: count = 4000 npages = (count + 60 - 1) / 60 if npages >= 2: b = BasicRequests() for p in range(2, npages + 1): url1 = b.compose_url(url, 'pageIndex', p) yield url1