Skip to main content

Package to download from ncore.pro

Project description

Test pypi downloads license

Ncoreparser

Introduction

This module provides python API-s to manage torrents from ncore.pro eg.: search, download, rssfeed, etc..

Install

pip install ncoreparser

Examples

Search torrent

Get most seeded torrents from all category

from ncoreparser import Client, SearchParamWhere, SearchParamType, ParamSort, ParamSeq


if __name__ == "__main__":
    client = Client()
    client.login("<username>", "<password>")

    for t_type in SearchParamType:
        torrent = client.search(pattern="", type=t_type, number=1,
                                sort_by=ParamSort.SEEDERS, sort_order=ParamSeq.DECREASING)[0]
        print(torrent['title'], torrent['type'], torrent['size'], torrent['id'])

    client.logout()

Download torrent

This example download Forest gump torrent file and save it to temp folder

from ncoreparser import Client, SearchParamWhere, SearchParamType, ParamSort, ParamSeq


if __name__ == "__main__":
    client = Client()
    client.login("<username>", "<password>")


    torrent = client.search(pattern="Forrest gump", type=SearchParamType.HD_HUN, number=1,
                            sort_by=ParamSort.SEEDERS, sort_order=ParamSeq.DECREASING)[0]

    client.download(torrent, "/tmp")
    client.logout()

Download torrent by rssfeed

This example get all torrents and their informations from an ncore bookmark (rss feed)

from ncoreparser import Client


if __name__ == "__main__":
    client = Client()
    client.login("<username>", "<password>")

    torrents = client.get_by_rss("<rss url>")
    for torrent in torrents:
        print(torrent['title'], torrent['type'], torrent['size'], torrent['id'])

    client.logout()

Get torrents by activity

This example get all torrents and their informations from the Hit&run page

from ncoreparser import Client


if __name__ == "__main__":
    client = Client()
    client.login("<username>", "<password>")

    torrents = client.get_by_activity()
    for torrent in torrents:
        print(torrent['title'], torrent['type'], torrent['size'],
              torrent['id'], torrent['rate'], torrent['remaining'])

    client.logout()

Get recommended torrents

This example get all torrents and their informations from the recommended page

from ncoreparser import Client, SearchParamType


if __name__ == "__main__":
    client = Client()
    client.login("<username>", "<password>")

    torrents = client.get_recommended(type=SearchParamType.HD_HUN)
    for torrent in torrents:
        print(torrent['title'], torrent['type'], torrent['size'], torrent['id'])

    client.logout()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ncoreparser-1.9.2.tar.gz (15.1 kB view details)

Uploaded Source

Built Distribution

ncoreparser-1.9.2-py2.py3-none-any.whl (9.6 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file ncoreparser-1.9.2.tar.gz.

File metadata

  • Download URL: ncoreparser-1.9.2.tar.gz
  • Upload date:
  • Size: 15.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for ncoreparser-1.9.2.tar.gz
Algorithm Hash digest
SHA256 7cf4e563cb47361f015a209b8a84a2d62dd0210a14e3ac23eaed01305189f214
MD5 80bc29a3f2f085619d38c2daffb7dad5
BLAKE2b-256 42916c666b85a2342bd2972478a6e7639e2866f86715937d408cc5a8a513d6c3

See more details on using hashes here.

File details

Details for the file ncoreparser-1.9.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for ncoreparser-1.9.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 680e0e9018b63b449ed26e7b93cc4a84918a7f29067490e4180baefe62e67df4
MD5 bf8791f76cb71e60f8cd108ce7f23a36
BLAKE2b-256 106add7d292709c185e9e6578ffb276770f579650d27c0aaf312ee850b36643d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page