如何使用爬虫
import requests,json,time,random
class TencentSpider(object):
def __init__(self):
self.headers = {
'User-Agent':'Mozilla/5.0'}
self.one_url = 'https://careers.tencent.com/tencentcareer/api/post/Query?timestamp=1565852070318&countryId' \
'=&cityId=&bgIds=&productId=&categoryId=&parentCategoryId=&attrId=&keyword=&pageIndex={' \
'}&pageSize=10&language=zh-cn&area=cn'
self.two_url = 'https://careers.tencent.com/tencentcareer/api/post/ByPostId?timestamp=1565857096001&postId={}' \
'&language=zh-cn'
# 请求函数(两级页面都需要请求)
def get_page(self