Package to download from ncore.pro
Project description
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
Release history Release notifications | RSS feed
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.0.tar.gz
(15.1 kB
view details)
Built Distribution
File details
Details for the file ncoreparser-1.9.0.tar.gz
.
File metadata
- Download URL: ncoreparser-1.9.0.tar.gz
- Upload date:
- Size: 15.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7162518b1e8c4bc582d2d84a4c292d512b30f885b6bef75db9836e2b95bf92db |
|
MD5 | 0827ca53b59c53c7c8aff19adf5fe623 |
|
BLAKE2b-256 | 3fd9ec61df23226708592697f36b422542cf1f379ebf4abd0e0d2623df9b02ec |
File details
Details for the file ncoreparser-1.9.0-py2.py3-none-any.whl
.
File metadata
- Download URL: ncoreparser-1.9.0-py2.py3-none-any.whl
- Upload date:
- Size: 9.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 594acd40cf31aae80122a7b2dc53d1fdfea8e58605591988c911736959c63b9c |
|
MD5 | 6caf65e0d014e66a1a7f8040bb753c12 |
|
BLAKE2b-256 | b9c415aa1f9f61cd89efb07af2002433dbefe228db2d34abfa96d63c1bc67f6f |