Giter Club home page Giter Club logo

yggtorrent's Introduction

yggtorrent's People

Contributors

cleming avatar gtorresani avatar navispeed avatar pitzzae avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

yggtorrent's Issues

TypeError: Cannot read property 'request' of undefined

Salut,

Tout marchait bien et d'un coup gros message d'erreur j'ai beau chercher je comprends pas pourquoi..

Avec seulement ce bout de code :

var express = require('express');
var fs = require('fs');
var YGG = require('yggtorrent');

var router = express.Router();
var client = new YGG();
client.set_credential('username', 'password');

router.get('/', function(req, res, next) {
  res.render('index', { title: 'Express' });
});

module.exports = router;

Je reçois ça :

C:\Users\Shadow\myproject\node_modules\request-promise-core\lib\plumbing.js:130
            throw thrownException;
            ^

TypeError: Cannot read property 'request' of undefined
    at Request.callback [as _rp_callbackOrig] (C:\Users\Shadow\myproject\node_modules\yggtorrent\index.js:182:50)
    at Request.plumbing.callback (C:\Users\Shadow\myproject\node_modules\request-promise-core\lib\plumbing.js:76:39)
    at Request.RP$callback [as _callback] (C:\Users\Shadow\myproject\node_modules\request-promise-core\lib\plumbing.js:46:31)
    at self.callback (C:\Users\Shadow\myproject\node_modules\request\request.js:185:22)
    at onChallenge (C:\Users\Shadow\myproject\node_modules\cloudscraper\index.js:317:12)
    at onCloudflareResponse (C:\Users\Shadow\myproject\node_modules\cloudscraper\index.js:247:12)
    at onRequestResponse (C:\Users\Shadow\myproject\node_modules\cloudscraper\index.js:205:5)
    at Request.<anonymous> (C:\Users\Shadow\myproject\node_modules\cloudscraper\index.js:149:7)
    at Object.onceWrapper (events.js:312:19)
    at emitTwo (events.js:125:13)
    at Request.emit (events.js:213:7)
    at Request.<anonymous> (C:\Users\Shadow\myproject\node_modules\request\request.js:1154:10)
    at emitOne (events.js:115:13)
    at Request.emit (events.js:210:7)
    at IncomingMessage.<anonymous> (C:\Users\Shadow\myproject\node_modules\request\request.js:1076:12)
    at Object.onceWrapper (events.js:312:19)
    at emitNone (events.js:110:20)
    at IncomingMessage.emit (events.js:207:7)
    at endReadableNT (_stream_readable.js:1045:12)
    at _combinedTickCallback (internal/process/next_tick.js:102:11)
    at process._tickCallback (internal/process/next_tick.js:161:9)
    at Function.module.exports.loopWhile (C:\Users\Shadow\myproject\node_modules\deasync\index.js:70:11)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node ./bin/www`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Shadow\AppData\Roaming\npm-cache\_logs\2020-11-14T00_11_18_344Z-debug.log

Avez vous déjà eu une erreur de ce genre ?

Search issue

Hello,

I just find out that the search with the sub category isn't working.
It's due to a change a the key in the url.
Can you change it ?

You need to replace subcategory by sub_category

Thanks,

Doesn't seem to work anymore

I tried the library with a basic code:

const YGG = require('yggtorrent');
var client = new YGG();
client.set_credential('username', 'passwd');

And I'm getting this error:

/var/tmp/yggtorrent/index.js:255
		if (res.statusCode === 301)
		        ^

TypeError: Cannot read property 'statusCode' of undefined
    at Request.optionalCallback [as _callback] (/var/tmp/yggtorrent/index.js:255:11)
    at self.callback (/var/tmp/yggtorrent/node_modules/request/request.js:185:22)
    at Request.emit (events.js:305:20)
    at Request.onRequestError (/var/tmp/yggtorrent/node_modules/request/request.js:881:8)
    at ClientRequest.emit (events.js:305:20)
    at TLSSocket.socketCloseListener (_http_client.js:397:11)
    at TLSSocket.emit (events.js:317:22)
    at net.js:667:12
    at TCP.done (_tls_wrap.js:491:7)
    at Function.module.exports.loopWhile (/var/tmp/yggtorrent/node_modules/deasync/index.js:71:23)

Also yggtorrent changed their domain to .ws

Trying to download a .torrent

Hi,
I m using your lib for making a " download center ".
So i got the id but i don't understand how your

client.get_torrent(function(buf, error) {
// buf is a Buffer or null, error is string or null
if (error)
console.log(error);
else
{
const parsed = require('parse-torrent')(buf);
console.log(parsed);
}
}, id);

is working ?

It seems like something happened with Ygg (again)...

Everything works fine since your last Cloudflare fix, but now :

That simply test :

const YGG = require('yggtorrent');

var client = new YGG();

client.set_credential('*****', '*******');

//list categories
client.get_categories(function(result) {
        console.log(result);
});
/var/www/yggtorrent-pizzae/node_modules/request-promise-core/lib/plumbing.js:130
            throw thrownException;
            ^

TypeError: Cannot read property 'request' of undefined
    at Request.callback [as _rp_callbackOrig] (/var/www/yggtorrent-pizzae/node_modules/yggtorrent/index.js:182:51)
    at Request.plumbing.callback (/var/www/yggtorrent-pizzae/node_modules/request-promise-core/lib/plumbing.js:76:39)
    at Request.RP$callback [as _callback] (/var/www/yggtorrent-pizzae/node_modules/request-promise-core/lib/plumbing.js:46:31)
    at self.callback (/var/www/yggtorrent-pizzae/node_modules/request/request.js:185:22)
    at onCloudflareResponse (/var/www/yggtorrent-pizzae/node_modules/cloudscraper/index.js:229:12)
    at onRequestResponse (/var/www/yggtorrent-pizzae/node_modules/cloudscraper/index.js:205:5)
    at Request.<anonymous> (/var/www/yggtorrent-pizzae/node_modules/cloudscraper/index.js:149:7)
    at Object.onceWrapper (events.js:317:30)
    at emitTwo (events.js:126:13)
    at Request.emit (events.js:214:7)
    at Request.<anonymous> (/var/www/yggtorrent-pizzae/node_modules/request/request.js:1154:10)
    at emitOne (events.js:116:13)
    at Request.emit (events.js:211:7)
    at IncomingMessage.<anonymous> (/var/www/yggtorrent-pizzae/node_modules/request/request.js:1076:12)
    at Object.onceWrapper (events.js:313:30)
    at emitNone (events.js:111:20)
    at IncomingMessage.emit (events.js:208:7)
    at endReadableNT (_stream_readable.js:1064:12)
    at _combinedTickCallback (internal/process/next_tick.js:139:11)
    at process._tickCallback (internal/process/next_tick.js:181:9)
    at Function.module.exports.loopWhile (/var/www/yggtorrent-pizzae/node_modules/deasync/index.js:70:11)
    at Function.sleep (/var/www/yggtorrent-pizzae/node_modules/deasync/index.js:41:18)

Authentication Timeout

Hello,

Sorry to bother you but it seems that the authentication isn't working anymore.
I've a timeout error.

If you have time to look at it or explain how you are getting the login cookies.
Thanks,

Last Cloudflare patch seems to be missing something...

With that simply code :

const YGG = require('yggtorrent');

var client = new YGG();

client.set_credential('*****', '******');

//list categories
client.get_categories(function(result) {
	console.log(result);
});

At first, Cookies module is missing in dependancies. But you can add it manually.

internal/modules/cjs/loader.js:638
    throw err;
    ^

Error: Cannot find module 'cookie'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/var/www/yggtorrent_crawler/node_modules/yggtorrent/index.js:3:14)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/var/www/yggtorrent_crawler/index.js:1:13)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)

Then I got this :

/var/www/yggtorrent_crawler/node_modules/request-promise-core/lib/plumbing.js:130
            throw thrownException;
            ^

TypeError: Cannot read property 'request' of undefined
    at Request.callback [as _rp_callbackOrig] (/var/www/yggtorrent_crawler/node_modules/yggtorrent/index.js:182:51)
    at Request.plumbing.callback (/var/www/yggtorrent_crawler/node_modules/request-promise-core/lib/plumbing.js:76:39)
    at Request.RP$callback [as _callback] (/var/www/yggtorrent_crawler/node_modules/request-promise-core/lib/plumbing.js:46:31)
    at self.callback (/var/www/yggtorrent_crawler/node_modules/request/request.js:185:22)
    at onCloudflareResponse (/var/www/yggtorrent_crawler/node_modules/cloudscraper/index.js:229:12)
    at onRequestResponse (/var/www/yggtorrent_crawler/node_modules/cloudscraper/index.js:205:5)
    at Request.<anonymous> (/var/www/yggtorrent_crawler/node_modules/cloudscraper/index.js:149:7)
    at Object.onceWrapper (events.js:286:20)
    at Request.emit (events.js:198:13)
    at Request.<anonymous> (/var/www/yggtorrent_crawler/node_modules/request/request.js:1154:10)
    at Request.emit (events.js:198:13)
    at Gunzip.<anonymous> (/var/www/yggtorrent_crawler/node_modules/request/request.js:1076:12)
    at Object.onceWrapper (events.js:286:20)
    at Gunzip.emit (events.js:203:15)
    at endReadableNT (_stream_readable.js:1143:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
    at Function.module.exports.loopWhile (/var/www/yggtorrent_crawler/node_modules/deasync/index.js:70:11)
    at Function.sleep (/var/www/yggtorrent_crawler/node_modules/deasync/index.js:41:18)
    at Client.set_credential (/var/www/yggtorrent_crawler/node_modules/yggtorrent/index.js:109:35)
    at Object.<anonymous> (/var/www/yggtorrent_crawler/index.js:5:8)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)

Any ideas ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.