Change ygg scraper and update install.sh
This commit is contained in:
parent
7b8ffc03eb
commit
5395fe8514
|
@ -36,6 +36,14 @@ scuttlebutt() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Install YGGTorrentScraper
|
||||||
|
yggts() {
|
||||||
|
echo -e "${c_yellow}Installing YGGTorrentScraper...$c_"
|
||||||
|
[[ -z $(which pip3) ]] && sudo apt install python3-pip
|
||||||
|
pip3 install yggtorrentscraper
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Check installs
|
# Check installs
|
||||||
## Check IPFS install
|
## Check IPFS install
|
||||||
|
|
|
@ -1,80 +0,0 @@
|
||||||
const YGG = require('yggtorrent');
|
|
||||||
var client = new YGG();
|
|
||||||
|
|
||||||
client.set_credential('kopa4', 'Ck695bvkyvPT0PJeYMOPUc');
|
|
||||||
|
|
||||||
/*
|
|
||||||
|
|
||||||
// list categories
|
|
||||||
client.get_categories(function(result) {
|
|
||||||
console.log(result);
|
|
||||||
});
|
|
||||||
|
|
||||||
// get nfo as text file
|
|
||||||
client.get_nfo(function(result) {
|
|
||||||
console.log(result);
|
|
||||||
}, id);
|
|
||||||
|
|
||||||
// get description as htlm format
|
|
||||||
client.get_info(function(result) {
|
|
||||||
console.log(result);
|
|
||||||
}, id);
|
|
||||||
|
|
||||||
// search torrents
|
|
||||||
client.search(function(result, page) {
|
|
||||||
console.log(result, page);
|
|
||||||
}, 'interstellar');
|
|
||||||
|
|
||||||
// download and parse a .torrent
|
|
||||||
client.get_torrent(function(buf, error) {
|
|
||||||
// `buf` is a Buffer or null, `error` is string or null
|
|
||||||
if (error)
|
|
||||||
console.log(error);
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var parsed = require('parse-torrent')(buf);
|
|
||||||
console.log(parsed);
|
|
||||||
}
|
|
||||||
}, id);
|
|
||||||
|
|
||||||
// get top day torrents
|
|
||||||
client.get_top_day(function(result, error) {
|
|
||||||
if (error)
|
|
||||||
console.log(error);
|
|
||||||
else
|
|
||||||
console.log(result);
|
|
||||||
});
|
|
||||||
|
|
||||||
// get top week torrents
|
|
||||||
client.get_top_week(function(result, error) {
|
|
||||||
if (error)
|
|
||||||
console.log(error);
|
|
||||||
else
|
|
||||||
console.log(result);
|
|
||||||
});
|
|
||||||
|
|
||||||
// get top month torrents
|
|
||||||
client.get_top_month(function(result, error) {
|
|
||||||
if (error)
|
|
||||||
console.log(error);
|
|
||||||
else
|
|
||||||
console.log(result);
|
|
||||||
});
|
|
||||||
|
|
||||||
// get most seeded torrents
|
|
||||||
client.get_mostseeded(function(result, error) {
|
|
||||||
if (error)
|
|
||||||
console.log(error);
|
|
||||||
else
|
|
||||||
console.log(result);
|
|
||||||
});
|
|
||||||
|
|
||||||
// get most completed torrents
|
|
||||||
client.get_mostcompleted(function(result, error) {
|
|
||||||
if (error)
|
|
||||||
console.log(error);
|
|
||||||
else
|
|
||||||
console.log(result);
|
|
||||||
});
|
|
||||||
|
|
||||||
*/
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue