python 实现搜狗站长平台手动提交url

python 实现搜狗站长平台手动提交url,大家都知道搜狗站长平台是如何进行手动提交的,而且都知道手动提交是会把网站的url推送给搜索引擎的,其实大量的url是不适合用这种方式的,但是作者还是抱着试试的心态去写了一下。代码如下:

cookies = {
    'IPLOC': 'CN3100',
    'SUID': 'XXXX',
    'SUV': 'XXXX',
    'sct': '59',
    'SNUID': 'CF9AE0D2AFAA0F149BE40EF0AF466E4F',
    'ld': 'llllllllll2W3x7@lllllVirB5tlllllWGJYZkllll9lllllRylll5@@@@@@@@@@',
    'pgv_pvi': '8849596416',
    'fa436db3c6f407fba40f0f4e90221942': 'f4c15c7c547ababc4d693badf00dbfad32f284d2a%3A4%3A%7Bi%3A0%3Bs%3A6%3A%22708171%22%3Bi%3A1%3Bs%3A3%3A%22sj5%22%3Bi%3A2%3Bi%3A2592000%3Bi%3A3%3Ba%3A2%3A%7Bs%3A8%3A%22userMail%22%3Bs%3A15%3A%22sj5%40isheji5.com%22%3Bs%3A4%3A%22sgid%22%3Bs%3A36%3A%2223-42461989-AV5hqpHCNOY16XsE16YkiaWE%22%3B%7D%7D',
    'LSTMV': '430%2C397',
    'LCLKINT': '9055',
    'PHPSESSID': 'kbh62mh7odls5jkj0nuhpeq190',
}

headers = {
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0',
    'Accept': 'application/json, text/javascript, */*; q=0.01',
    'Accept-Language': 'zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2',
    'Referer': 'http://zhanzhang.sogou.com/index.php/sitelink/index',
    'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
    'X-Requested-With': 'XMLHttpRequest',
    'Origin': 'http://zhanzhang.sogou.com',
    'Connection': 'keep-alive',
}

f=open("allurl.txt","r")
for line in f :
  data = {
    # 'webAdr': 'https://isheji5.com/tupian/huaxiagudu.html\nhttps://isheji5.com/tupian/gerenxingxiangxuanchuan.html\nhttps://isheji5.com/tupian/bolimentieyu.html\nhttps://isheji5.com/tupian/wanshengjiezhuangshi.html\nhttps://isheji5.com/tupian/fengjinghanlu.html\nhttps://isheji5.com/tupian/jinqiuchuyou.html\nhttps://isheji5.com/tupian/anquantishi.html\nhttps://isheji5.com/tupian/dongjinuanyi.html\nhttps://isheji5.com/tupian/dafangjia.html\n',
    'webAdr': line,
    'site_type': '1',
    'reason': '',
    'email': 'XXXX@qq.com'
  }

  response = requests.post('http://zhanzhang.sogou.com/index.php/urlSubmit/create', headers=headers, cookies=cookies, data=data)
  a=random.randint(3,9)
  time.sleep(a)
  print(line)
  print(response.text)

的却能实现自动提交,但是由于第一次没经验,提交的过快,被拉近黑名单了。难受。下一篇记录如何实现python 实现360站长平台手动提交url。又是一场难受的旅程。


	
分类: 站长原创

发表评论 X

电子邮件地址不会被公开。 必填项已用*标注

姓名不能为空
填写正确的email