{"version":3,"sources":["jsdelivr-header.js","/npm/isohunt@0.0.2/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACLA,MAAM,QAAU,QAAQ,WAClB,QAAU,QAAQ,WAGxB,IAAI,WAAa,qBAEjB,OAAO,QAAU,CACf,OAAQ,SAAS,EAAS,GACxB,IAAI,EAAW,GAEf,QADa,WAAa,kBAAoB,EAAU,0BACxC,SAAS,EAAK,EAAK,GACjC,IAAI,EAAI,QAAQ,KAAK,GAWrB,OAVA,EAAE,2BAA2B,MAAK,SAAS,EAAO,GAChD,IAAI,EAAU,CAAC,EACf,EAAQ,KAAO,EAAE,MAAM,KAAK,uBAAuB,OACnD,EAAQ,KAAO,EAAE,MAAM,KAAK,eAAe,OAC3C,EAAQ,QAAU,EAAE,MAAM,KAAK,SAAS,OACxC,EAAQ,IAAM,WAAa,EAAE,MAAM,KAAK,kBAAkB,KAAK,QAC1C,KAAjB,EAAQ,MACV,EAAS,KAAK,EAElB,IACO,EAAG,KAAM,EAClB,GACF","file":"/npm/isohunt@0.0.2/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/isohunt@0.0.2/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","// Modules\nconst request = require('request')\nconst cheerio = require('cheerio')\n\n// Isohunt base URL\nlet isohuntURL = 'https://isohunt.to'\n\nmodule.exports = {\n  search: function(keyword, cb) {\n    let torrents = []\n    var reqURL = isohuntURL + '/torrents/?ihq=' + keyword + '&Torrent_sort=-seeders'\n    request(reqURL, function(err, res, body) {\n      var $ = cheerio.load(body)\n      $('table.table-torrents tr').each(function(index, el) {\n        var torrent = {}\n        torrent.name = $(this).find('td.title-row a span').text()\n        torrent.size = $(this).find('td.size-row').text()\n        torrent.seeders = $(this).find('td.sy').text()\n        torrent.url = isohuntURL + $(this).find('td.title-row a').attr('href')\n        if (torrent.name !== '') {\n          torrents.push(torrent)\n        }\n      })\n      return cb(null, torrents)\n    })\n  }\n}\n"]}