DiegoRBaquero / BTorrent

:globe_with_meridians: Fully-featured WebTorrent Client
https://btorrent.xyz
MIT License
549 stars 95 forks source link

How to get file stats from Btorrent tracker #80

Closed meotimdihia closed 2 years ago

meotimdihia commented 4 years ago

I am using code from https://github.com/webtorrent/bittorrent-tracker:


        Client.scrape({
          announce: ['ws://tracker.btorrent.xyz'],
          infoHash: [parse.infoHash]
        }, function (err, results) {
          console.log(err)
        })

And get this error: Error: Unsupported tracker protocol: ws://tracker.btorrent.xyz

DiegoRBaquero commented 4 years ago

Maybe wss?

meotimdihia commented 4 years ago

I changed it to 'wss' the result is the same. This is a code example: https://repl.it/@meotimdihia/ExpertLovableSolution#index.js

  const Client = require('bittorrent-tracker')

  Client.scrape({
    announce: "wss://tracker.btorrent.xyz",
    infoHash: ["23e5e897a680ac74c4b4b49384f636418e343398"]
  }, function (err, results) {
    if (err) {
      console.log("ERRRROR: " + err)
    } else {
      console.log(results)
    }
  })
DiegoRBaquero commented 3 years ago

Did you ever solve this?