Парсер на javascript

M9
На сайте с 15.05.2014
Offline
79
343

я пытаюсь распарсит эту страницу json по офф сайту выводить:

а по моему коду выдачи не существует:


<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
var cookie = '';
var i = (new Date).getTime();
var e = '{"appId":"3113","params":"{\"catmap_version\":\"3.0\",\"tab\":\"on\",\"industry\":\"\"}"}';
var r = function(t) {
function n(t, n) {
return t << n | t >>> 32 - n
}
function e(t, n) {
var e, r, o, a, c;
return o = 2147483648 & t,
a = 2147483648 & n,
e = 1073741824 & t,
r = 1073741824 & n,
c = (1073741823 & t) + (1073741823 & n),
e & r ? 2147483648 ^ c ^ o ^ a : e | r ? 1073741824 & c ? 3221225472 ^ c ^ o ^ a : 1073741824 ^ c ^ o ^ a : c ^ o ^ a
}
function r(t, n, e) {
return t & n | ~t & e
}
function o(t, n, e) {
return t & e | n & ~e
}
function a(t, n, e) {
return t ^ n ^ e
}
function c(t, n, e) {
return n ^ (t | ~e)
}
function i(t, o, a, c, i, u, l) {
return t = e(t, e(e(r(o, a, c), i), l)),
e(n(t, u), o)
}
function u(t, r, a, c, i, u, l) {
return t = e(t, e(e(o(r, a, c), i), l)),
e(n(t, u), r)
}
function l(t, r, o, c, i, u, l) {
return t = e(t, e(e(a(r, o, c), i), l)),
e(n(t, u), r)
}
function f(t, r, o, a, i, u, l) {
return t = e(t, e(e(c(r, o, a), i), l)),
e(n(t, u), r)
}
function s(t) {
for (var n, e = t.length, r = e + 8, o = (r - r % 64) / 64, a = 16 * (o + 1), c = new Array(a - 1), i = 0, u = 0; u < e; )
n = (u - u % 4) / 4,
i = u % 4 * 8,
c[n] = c[n] | t.charCodeAt(u) << i,
u++;
return n = (u - u % 4) / 4,
i = u % 4 * 8,
c[n] = c[n] | 128 << i,
c[a - 2] = e << 3,
c[a - 1] = e >>> 29,
c
}
function p(t) {
var n, e, r = "", o = "";
for (e = 0; e <= 3; e++)
n = t >>> 8 * e & 255,
o = "0" + n.toString(16),
r += o.substr(o.length - 2, 2);
return r
}
function d(t) {
t = t.replace(/\r\n/g, "\n");
for (var n = "", e = 0; e < t.length; e++) {
var r = t.charCodeAt(e);
r < 128 ? n += String.fromCharCode(r) : r > 127 && r < 2048 ? (n += String.fromCharCode(r >> 6 | 192),
n += String.fromCharCode(63 & r | 128)) : (n += String.fromCharCode(r >> 12 | 224),
n += String.fromCharCode(r >> 6 & 63 | 128),
n += String.fromCharCode(63 & r | 128))
}
return n
}
var g, h, m, v, b, y, C, S, w, E = [], _ = 7, I = 12, N = 17, j = 22, A = 5, k = 9, O = 14, L = 20, T = 4, U = 11, K = 16, R = 23, F = 6, $ = 10, x = 15, D = 21;
for (t = d(t),
E = s(t),
y = 1732584193,
C = 4023233417,
S = 2562383102,
w = 271733878,
g = 0; g < E.length; g += 16)
h = y,
m = C,
v = S,
b = w,
y = i(y, C, S, w, E[g + 0], _, 3614090360),
w = i(w, y, C, S, E[g + 1], I, 3905402710),
S = i(S, w, y, C, E[g + 2], N, 606105819),
C = i(C, S, w, y, E[g + 3], j, 3250441966),
y = i(y, C, S, w, E[g + 4], _, 4118548399),
w = i(w, y, C, S, E[g + 5], I, 1200080426),
S = i(S, w, y, C, E[g + 6], N, 2821735955),
C = i(C, S, w, y, E[g + 7], j, 4249261313),
y = i(y, C, S, w, E[g + 8], _, 1770035416),
w = i(w, y, C, S, E[g + 9], I, 2336552879),
S = i(S, w, y, C, E[g + 10], N, 4294925233),
C = i(C, S, w, y, E[g + 11], j, 2304563134),
y = i(y, C, S, w, E[g + 12], _, 1804603682),
w = i(w, y, C, S, E[g + 13], I, 4254626195),
S = i(S, w, y, C, E[g + 14], N, 2792965006),
C = i(C, S, w, y, E[g + 15], j, 1236535329),
y = u(y, C, S, w, E[g + 1], A, 4129170786),
w = u(w, y, C, S, E[g + 6], k, 3225465664),
S = u(S, w, y, C, E[g + 11], O, 643717713),
C = u(C, S, w, y, E[g + 0], L, 3921069994),
y = u(y, C, S, w, E[g + 5], A, 3593408605),
w = u(w, y, C, S, E[g + 10], k, 38016083),
S = u(S, w, y, C, E[g + 15], O, 3634488961),
C = u(C, S, w, y, E[g + 4], L, 3889429448),
y = u(y, C, S, w, E[g + 9], A, 568446438),
w = u(w, y, C, S, E[g + 14], k, 3275163606),
S = u(S, w, y, C, E[g + 3], O, 4107603335),
C = u(C, S, w, y, E[g + 8], L, 1163531501),
y = u(y, C, S, w, E[g + 13], A, 2850285829),
w = u(w, y, C, S, E[g + 2], k, 4243563512),
S = u(S, w, y, C, E[g + 7], O, 1735328473),
C = u(C, S, w, y, E[g + 12], L, 2368359562),
y = l(y, C, S, w, E[g + 5], T, 4294588738),
w = l(w, y, C, S, E[g + 8], U, 2272392833),
S = l(S, w, y, C, E[g + 11], K, 1839030562),
C = l(C, S, w, y, E[g + 14], R, 4259657740),
y = l(y, C, S, w, E[g + 1], T, 2763975236),
w = l(w, y, C, S, E[g + 4], U, 1272893353),
S = l(S, w, y, C, E[g + 7], K, 4139469664),
C = l(C, S, w, y, E[g + 10], R, 3200236656),
y = l(y, C, S, w, E[g + 13], T, 681279174),
w = l(w, y, C, S, E[g + 0], U, 3936430074),
S = l(S, w, y, C, E[g + 3], K, 3572445317),
C = l(C, S, w, y, E[g + 6], R, 76029189),
y = l(y, C, S, w, E[g + 9], T, 3654602809),
w = l(w, y, C, S, E[g + 12], U, 3873151461),
S = l(S, w, y, C, E[g + 15], K, 530742520),
C = l(C, S, w, y, E[g + 2], R, 3299628645),
y = f(y, C, S, w, E[g + 0], F, 4096336452),
w = f(w, y, C, S, E[g + 7], $, 1126891415),
S = f(S, w, y, C, E[g + 14], x, 2878612391),
C = f(C, S, w, y, E[g + 5], D, 4237533241),
y = f(y, C, S, w, E[g + 12], F, 1700485571),
w = f(w, y, C, S, E[g + 3], $, 2399980690),
S = f(S, w, y, C, E[g + 10], x, 4293915773),
C = f(C, S, w, y, E[g + 1], D, 2240044497),
y = f(y, C, S, w, E[g + 8], F, 1873313359),
w = f(w, y, C, S, E[g + 15], $, 4264355552),
S = f(S, w, y, C, E[g + 6], x, 2734768916),
C = f(C, S, w, y, E[g + 13], D, 1309151649),
y = f(y, C, S, w, E[g + 4], F, 4149444226),
w = f(w, y, C, S, E[g + 11], $, 3174756917),
S = f(S, w, y, C, E[g + 2], x, 718787259),
C = f(C, S, w, y, E[g + 9], D, 3951481745),
y = e(y, h),
C = e(C, m),
S = e(S, v),
w = e(w, b);
var Y = p(y) + p(C) + p(S) + p(w);
return Y.toLowerCase()
};
var sign = r([cookie.replace(/.*?(?:\b|;)\s*_m_h5_tk=([^;]+).*$|.*/, "$1").split("_")[0], i, '12574478', e].join("&"));
var dateget = 'jsv=2.4.5&appKey=12574478&t='+i+'&sign='+sign+'&api=mtop.relationrecommend.WirelessRecommend.recommend&v=2.0&preventFallback=true&type=jsonp&dataType=jsonp&data='+e ;
$.ajax({
url: "https://h5api.m.taobao.com/h5/mtop.relationrecommend.wirelessrecommend.recommend/2.0/?",
data:dateget,
dataType: "jsonp",
jsonpCallback: "mtopjsonp1",
success: function(r) {
console.log(r);
}
}).fail(function() {
console.error("fail getContent, try again ..."),
t.getContent.apply(t)
});
</script>

Авторизуйтесь или зарегистрируйтесь, чтобы оставить комментарий