抓取AWS partner伙伴信息
之前写过一个采集AWS partner信息的 python 脚本,后来忘记放哪了,今天没事又重新写了一个,内容如下: 1# code from blog.361way.com 2import requests,json,xlsxwriter,argparse 3 4def increment(start, end, step): 5 """ 6 递增函数 7 8 :param start: 开始值 9 :param end: 结束值 10 :param step: 步长 11 :return: 递增序列 12 """ 13 sequence = [] 14 for i in range(start, end + 1, step): 15 sequence.append(i) 16 return sequence 17 18def crawl(num,country): 19 url = 'https://api.finder.partners.aws.a2z.com/search?locale=en&highlight=on&sourceFilter=searchPage&size=10&location=' + country + '&from=' + str(num) 20 21 response = requests.get(url) 22 partners = response.text 23 data = json.loads(partners) 24 pdata……