前言: 解析不够, 逆向来凑
需求需求爬取个人信息
问题python 爬取站点个人信息, 发现页面展示和爬虫源码不符合,含有加密信息;
# 需求预期邮箱 #mailto:mbillingslea@hudson.org Email # 爬虫获取邮箱 # /cdn-cgi/l/email-protection#7f121d1613131611180c131a1e3f170a1b0c101151100d18 Email查找封装处理js
!function(){"use strict";function e(e){try{if("undefined"==typeof console)return;"error"in console?console.error(e):console.log(e)}catch(e){}}function t(e){return d.innerHTML='',d.childNodes[0].getAttribute("href")||""}function r(e,t){var r=e.substr(t,2);return parseInt(r,16)}function n(n,c){for(var o="",a=r(n,c),i=c+2;i-1&&(o.href="mailto:"+n(o.href,a+l.length))}catch(i){e(i)}}function o(t){for(var r=t.querySelectorAll(u),c=0;c
js 简化
简单来说, 就是剔除不需要的,尽量简化到能看明白; LOOK:
function fn(n){
var a = parseInt(n.substr(0,2), 16)
for(var o="",i=0+2;i
处理方式
两种处理结果方式:
1、 方法处理成 python 函数,封装结果解析;
2、 直接使用现成轮子包,处理 js2py
最终结果
LOOK:



