test.py 1.0 KB

12345678910111213141516171819202122232425
  1. import requests, json
  2. from lib.webapi import apimgr
  3. s = requests.Session()
  4. headers = {
  5. "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36 Edg/114.0.1823.67"
  6. }
  7. response = s.post("https://www.jianyu360.cn/phone/login", headers=headers,data=
  8. {
  9. 'reqType': 'phoneLogin',
  10. 'isAutoLogin': 'false',
  11. 'phone': '15225181827',
  12. 'password': '123456'
  13. })
  14. params = {"keywords": "科技", "publishtime": 'thisyear', "timeslot": "", "area": "", "subtype": "",
  15. "minprice": "", "maxprice": "", "industry": "", "buyerclass": "", "buyertel": "", "winnertel": "",
  16. "selectType": "title", "notkey": "", "fileExists": "0", "city": "", "searchGroup": "0",
  17. "searchMode": "0", "wordsMode": "0", "additionalWords": ""}
  18. response1 = s.post('https://www.jianyu360.cn/jylab/purSearch/index.html', headers=headers, params=params)
  19. # r=response1.json()
  20. apimgr.printResponse(response1)
  21. print(response1.status_code)
  22. # temp=r['status']
  23. # temp1=r['userInfo']['result']
  24. # print(temp,temp1)