当前位置:   article > 正文

今日头条爬虫_头条爬虫程序需

头条爬虫程序需
  1. import math
  2. import time
  3. import hashlib
  4. def as_cp_clac():
  5. t = int(time.time())
  6. print(t)
  7. a = hex(t)
  8. a = a.upper()
  9. a = a.lstrip('0X')
  10. print(a)
  11. e = hashlib.md5()
  12. e.update(str(t).encode(encoding='utf-8'))
  13. e = e.hexdigest().upper()
  14. if len(a) != 8:
  15. as_str = "479BB4B7254C150"
  16. cp_str = "7E0AC8874BB0985"
  17. else:
  18. s = e[0:5]
  19. o = e[-5:]
  20. n = ''
  21. l = ''
  22. for i in range(0,5):
  23. n += s[i] + a[i]
  24. for j in range(0,5):
  25. l += a[j+3] + o[j]
  26. as_str = 'A1' + n + a[-3:]
  27. cp_str = a[0:3] + l + 'E1'
  28. return as_str, cp_str
  29. """
  30. !function(t) {
  31. var i = {};
  32. i.getHoney = function() {
  33. # 获取毫秒数,
  34. var t = Math.floor((new Date).getTime() / 1e3)
  35. # 将 t 转为 16 进制
  36. , i = t.toString(16).toUpperCase()
  37. , e = md5(t).toString().toUpperCase();
  38. if (8 != i.length)
  39. return {
  40. as: "479BB4B7254C150",
  41. cp: "7E0AC8874BB0985"
  42. };
  43. for (var s = e.slice(0, 5), o = e.slice(-5), n = "", a = 0; 5 > a; a++)
  44. n += s[a] + i[a];
  45. for (var l = "", r = 0; 5 > r; r++)
  46. l += i[r + 3] + o[r];
  47. return {
  48. as: "A1" + n + i.slice(-3),
  49. cp: i.slice(0, 3) + l + "E1"
  50. }
  51. }
  52. ,
  53. """
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/人工智能uu/article/detail/958717
推荐阅读
相关标签
  

闽ICP备14008679号