Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node.js is needed? #278

Closed
charlsagente opened this issue Mar 11, 2015 · 1 comment
Closed

Node.js is needed? #278

charlsagente opened this issue Mar 11, 2015 · 1 comment

Comments

@charlsagente
Copy link

@charlsagente charlsagente commented Mar 11, 2015

Hi, my name is Carlos and im making some testings with your API.

Im trying to download a torrent from this page https://kickass.to/sam-smith-lay-me-down-feat-john-legend-single-2015-mp3-320-kbps-vbuc-t10323461.html.

I copied and pasted the entire magnetic link to the magnetUri var and my code is...

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
      <script src="webtorrent.min.js"></script>
</head>
<body>
 <script>
 var client = new WebTorrent()
var magnetUri = 'magnet:?xt=urn:btih:179FD8C5B157EDB920C3C8AC097B4AB4CA994B87&dn=sam+smith+lay+me+down+feat+john+legend+single+2015+mp3+320+kbps+vbuc&tr=http%3A%2F%2Fannounce.torrentsmd.com%3A6969%2Fannounce&tr=udp%3A%2F%2Fopen.demonii.com%3A1337'

client.add(magnetUri, { tmp: 'C:\Users\lenovo\Downloads' },function (torrent) {
  // Got torrent metadata!
  console.log('Torrent info hash:', torrent.infoHash)

  torrent.files.forEach(function (file) {
    // Get a url for each file
    file.getBlobURL(function (err, url) {
      if (err) throw err

      // Add a link to the page
      var a = document.createElement('a')
      a.download = file.name
      a.href = url
      a.textContent = 'Download ' + file.name
      document.body.appendChild(a)
    })
  })
})
 </script>
  </body>
</html>

I have this file as index.html page inside my apache server, when i run this, this does nothing

Is node.js necesary? what am i doing wrong?

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Mar 11, 2015

Please do not open issues requesting assistance to commit copyright infringement. We do not condone copyright infringement and cannot help with such requests.

@feross feross closed this Mar 11, 2015
@webtorrent webtorrent locked and limited conversation to collaborators Mar 11, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.