Skip to main content

Package to download from ncore.pro

Project description

Build 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.SD_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.SD_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.8.0.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: ncoreparser-1.8.0.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.8.12 Linux/5.11.0-1028-azure

File hashes

Hashes for ncoreparser-1.8.0.tar.gz
Algorithm Hash digest
SHA256 8ea8db456577f6993b91910070d4662327aeb4634af6bd6bd8e4bdf8b0f12d5c
MD5 c66bbcd92417226dcacd76b0010bcc68
BLAKE2b-256 494127b5a3b5be42315b0d40788eb40b4bc3704f0393fd7cb44c7bce14eb3947

See more details on using hashes here.

File details

Details for the file ncoreparser-1.8.0-py3-none-any.whl.

File metadata

  • Download URL: ncoreparser-1.8.0-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.8.12 Linux/5.11.0-1028-azure

File hashes

Hashes for ncoreparser-1.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9d90ba04e08bdc1a422cc26b0c2f2afa79717ab71f97b141815f1f296b4eda43
MD5 f09313cedf6d5aed5ee6712ef2c1e3db
BLAKE2b-256 e1fffeecfc16767322c63a86c53ce1a88d71d14e80bf77b146158fee5b6149a6

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