Giter VIP home page Giter VIP logo

pytorrent's People

Contributors

airswing avatar frozenfighter avatar gallexis avatar mys7erio avatar shunya007 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pytorrent's Issues

seeding

Does the project support NAT? I have tried seeding, but I found the message with correct IP but without correct PORT(always 8000) from tracker

download does not start

connects to some peers but doesn't start the download, it just stays at 'INFO:root:No unchocked peers'

i'm using windows 10 and python 3.9.0

Private Tracker

I am trying to download a file that is shared with the private tracker, but it seems not working. Is it possible to download such files using this library?

Magnet links

Can you add a feature to download from magnet links?

INFO:root:No unchocked peers

After putting the torrent file like below,

self.torrent = torrent.Torrent().load_from_path(
            "ubuntu-18.04.4-desktop-amd64.iso.torrent")

I only get the INFO:root:No unchocked peers in the terminal.
No download is happening.
Thanks.

seeding

Hi! Amazing work there. I want to extend your work for seeding. Any ideas which libraries to use?

addon to kodi

do you intend to create a kodi addon using pytorrent? would be good for xbox one
elementum is no longer developed and the binary does not run on xbox one, so pytorrent can revolutionize kodi.

download from magnet links

Could you put magnet links to download? I want to implement it on Kodi to run on Xbox without depending on binary
I also wanted the python code to pull the specific chunk when the person scrolls through the video on Kodi
I will be happy if I can help with this idea

Bittorrent V2 Support

Does this library support the Bittorrent V2/BEP 52 protocol? If not, I would like to make this a feature request.

I may dive into the library and help submit PRs if this is something that is deemed worth supporting.

TypeError: 'int' object is not subscriptable

DEBUG:root:[['http://openbittorrent.com:80/announce']]
DEBUG:root:[{'path': 'README.txt', 'length': 64}]
INFO:root:PeersManager Started
INFO:root:PiecesManager Started
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): openbittorrent.com:80
DEBUG:urllib3.connectionpool:http://openbittorrent.com:80 "GET /announce?info_hash=0b%87%7B%B5%DA%C7%F4%8A%0E%A7%C4%14%8FV%5Cd%86j%C7&peer_id=%A95%C3%CE%03%A0%C8Q%D6%83%D5S%60%89O%DB%BC%96%EF%06&uploaded=0&downloaded=0&port=6881&left=64&event=started HTTP/1.1" 301 185
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): tracker.openbittorrent.com:80
DEBUG:urllib3.connectionpool:http://tracker.openbittorrent.com:80 "GET /announce?info_hash=0b%87%7B%B5%DA%C7%F4%8A%0E%A7%C4%14%8FV%5Cd%86j%C7&peer_id=%A95%C3%CE%03%A0%C8Q%D6%83%D5S%60%89O%DB%BC%96%EF%06&uploaded=0&downloaded=0&port=6881&left=64&event=started HTTP/1.1" 200 105
DEBUG: {'complete': 1, 'downloaded': 0, 'incomplete': 1, 'interval': 1752, 'min interval': 876, 'peers': b'\xb4\x94i\xd1\x1a\xe1\xb4\x94i\xd1\xc8\xd5'}
ERROR:root:HTTP scraping failed: 'int' object is not subscriptable
Traceback (most recent call last):
  File "C:\Users\Jimmy\Documents\pytorrent-master\tracker.py", line 95, in http_scraper
    s = SockAddr(p['ip'], p['port'])
TypeError: 'int' object is not subscriptable

Could you provide some .torrent files as examples?

hello, I use my own torrent file to test the code, but something wrong like this:
File "F:\研究生\分布式系统\pytorrent-master\pytorrent-master\peers_manager.py", line 96, in run
read_list, _, _ = select.select(read, [], [], 1)
OSError: [WinError 10022] 提供了一个无效的参数(valid argument has provided, in English)。

I guess my own file may cause this error.

Proper Documentation Required

Id love to learn how to use your repository but i cant seem to find a documentation for it. can you provide some usage instructions? that would be great

HTTP Scraping failed on Ubuntu torrent

Hi, Downloading https://releases.ubuntu.com/21.10/ubuntu-21.10-desktop-amd64.iso.torrent gives this error.

ERROR:root:HTTP scraping failed: HTTPSConnectionPool(host='torrent.ubuntu.com', port=443): Max retries exceeded with url: /announce?info_hash=%F1%FC%DC%14b%D3e0%F5%26%C1%D9%40.%EC%91%00%B7%BA%18&peer_id=z%A7s%22%1E%B4%E1%DF%7F%ECR6%91%91%E3%24%A2%C6%3FO&uploaded=0&downloaded=0&port=6881&left=3116482560&event=started (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fc7722b59d0>: Failed to establish a new connection: [Errno 101] Network is unreachable'))
Traceback (most recent call last):
  File "/home/derrek/PycharmProjects/PyTorrent/venv/lib/python3.9/site-packages/urllib3/connection.py", line 174, in _new_conn
    conn = connection.create_connection(
  File "/home/derrek/PycharmProjects/PyTorrent/venv/lib/python3.9/site-packages/urllib3/util/connection.py", line 95, in create_connection
    raise err
  File "/home/derrek/PycharmProjects/PyTorrent/venv/lib/python3.9/site-packages/urllib3/util/connection.py", line 85, in create_connection
    sock.connect(sa)
OSError: [Errno 101] Network is unreachable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/derrek/PycharmProjects/PyTorrent/venv/lib/python3.9/site-packages/urllib3/connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
  File "/home/derrek/PycharmProjects/PyTorrent/venv/lib/python3.9/site-packages/urllib3/connectionpool.py", line 386, in _make_request
    self._validate_conn(conn)
  File "/home/derrek/PycharmProjects/PyTorrent/venv/lib/python3.9/site-packages/urllib3/connectionpool.py", line 1040, in _validate_conn
    conn.connect()
  File "/home/derrek/PycharmProjects/PyTorrent/venv/lib/python3.9/site-packages/urllib3/connection.py", line 358, in connect
    conn = self._new_conn()
  File "/home/derrek/PycharmProjects/PyTorrent/venv/lib/python3.9/site-packages/urllib3/connection.py", line 186, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7fc7722b59d0>: Failed to establish a new connection: [Errno 101] Network is unreachable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/derrek/PycharmProjects/PyTorrent/venv/lib/python3.9/site-packages/requests/adapters.py", line 440, in send
    resp = conn.urlopen(
  File "/home/derrek/PycharmProjects/PyTorrent/venv/lib/python3.9/site-packages/urllib3/connectionpool.py", line 785, in urlopen
    retries = retries.increment(
  File "/home/derrek/PycharmProjects/PyTorrent/venv/lib/python3.9/site-packages/urllib3/util/retry.py", line 592, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='torrent.ubuntu.com', port=443): Max retries exceeded with url: /announce?info_hash=%F1%FC%DC%14b%D3e0%F5%26%C1%D9%40.%EC%91%00%B7%BA%18&peer_id=z%A7s%22%1E%B4%E1%DF%7F%ECR6%91%91%E3%24%A2%C6%3FO&uploaded=0&downloaded=0&port=6881&left=3116482560&event=started (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fc7722b59d0>: Failed to establish a new connection: [Errno 101] Network is unreachable'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/derrek/PycharmProjects/PyTorrent/pytorrent/tracker.py", line 89, in http_scraper
    answer_tracker = requests.get(tracker, params=params, timeout=5)
  File "/home/derrek/PycharmProjects/PyTorrent/venv/lib/python3.9/site-packages/requests/api.py", line 75, in get
    return request('get', url, params=params, **kwargs)
  File "/home/derrek/PycharmProjects/PyTorrent/venv/lib/python3.9/site-packages/requests/api.py", line 61, in request
    return session.request(method=method, url=url, **kwargs)
  File "/home/derrek/PycharmProjects/PyTorrent/venv/lib/python3.9/site-packages/requests/sessions.py", line 529, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/derrek/PycharmProjects/PyTorrent/venv/lib/python3.9/site-packages/requests/sessions.py", line 645, in send
    r = adapter.send(request, **kwargs)
  File "/home/derrek/PycharmProjects/PyTorrent/venv/lib/python3.9/site-packages/requests/adapters.py", line 519, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='torrent.ubuntu.com', port=443): Max retries exceeded with url: /announce?info_hash=%F1%FC%DC%14b%D3e0%F5%26%C1%D9%40.%EC%91%00%B7%BA%18&peer_id=z%A7s%22%1E%B4%E1%DF%7F%ECR6%91%91%E3%24%A2%C6%3FO&uploaded=0&downloaded=0&port=6881&left=3116482560&event=started (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fc7722b59d0>: Failed to establish a new connection: [Errno 101] Network is unreachable'))
ERROR:root:HTTP scraping failed: a bytes-like object is required, not 'list'
Traceback (most recent call last):
  File "/home/derrek/PycharmProjects/PyTorrent/pytorrent/tracker.py", line 103, in http_scraper
    ip = struct.unpack_from("!i", list_peers['peers'], offset)[0]
TypeError: a bytes-like object is required, not 'list'

if you don't want to fix this, any way you can point me in the right direction?

No way to provide torrent file from command line

There's no quick way to run the program by providing the torrent file from the command line itself.

Right now, the name of the torrent file is hard-coded which is considered bad practice. Using the sys module to take the torrent file name as an argument from the command line would be a quick fix and a QOL upgrade.

no license specified

I was interested in possibly using your code, but I don't see a license specified.

Please include a license for your code. Thanks.

Seeding

Hi,
Is it possible to continue seeding after a file has been downloaded?
Thanks!

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.