Advertisement
Guest User

Untitled

a guest
May 24th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. p = n.n(f),
  2. m = n.n(h),
  3. P = function(e, t) {
  4.   var url = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : "//zingmp3.vn/api";
  5.   t.ctime = secondsSinceEpoch()
  6.   t.sig = O(e, t)
  7.   t.api_key = b.b
  8.   return url + e + "?" + buildQueryString(t)
  9. },
  10.  
  11. O = function(e, t) {
  12.   var n = filterParams(t),
  13.     r = p()("" + n);
  14.   return m()(e + r, b._76)
  15. }
  16.  
  17. // Strip all parameters except ctime and id
  18. filterParams = function(e) {
  19.   var t = copyObj(e);
  20.   var n = [];
  21.   for (var key in t)
  22.     if ("ctime" !== key && "id" !== key)
  23.       continue;
  24.     if (null !== e[key] && void 0 !== e[key])
  25.       n[key] = t[key];
  26.   return buildQueryString(n)
  27. }
  28.  
  29. // Build query string from arguments whose length doesn't exceed 5000
  30. buildQueryString = function(e) {
  31.   var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "&";
  32.   return Object.keys(e).map(function(key) {
  33.     if (encodeURIComponent(e[key]).length > 5000)
  34.       return "";
  35.     return encodeURIComponent(key) + "=" + encodeURIComponent(e[key])
  36.   }).filter(function(e) {
  37.     return "" !== e
  38.   }).join(t)
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement