diff --git a/.gitignore b/.gitignore index b31e270..10dc4f1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ data/* ygg-crawler/node_modules/ +login.py diff --git a/README.md b/README.md new file mode 100644 index 0000000..7355e5e --- /dev/null +++ b/README.md @@ -0,0 +1,17 @@ +# IPTubes +## yggtorrent to IPFS + +This is a submodule of [Astroport project](https://git.p2p.legal/axiom-team/astroport). You can use it standalone. +IPTubes is a yggtorrent content migrator to a public IPFS swam. + +### Standalone installation + +``` +git clone https://git.p2p.legal/axiom-team/astroport-iptubes.git +cd astroport-iptubes +./install.sh +``` + +More informations: https://astroport.com + +**WARNING: This is an early stage develepment, use it with great care!** diff --git a/crawl.py b/crawl.py index 8a1dd4d..5c8d4ec 100755 --- a/crawl.py +++ b/crawl.py @@ -1,17 +1,39 @@ import requests +import json +import sys +import login + from yggtorrentscraper import YggTorrentScraper - scraper = YggTorrentScraper(requests.session()) - from yggtorrentscraper import set_yggtorrent_tld - set_yggtorrent_tld("se") +name = sys.argv[1] -if(scraper.login("kopa4", "Ck695bvkyvPT0PJeYMOPUc")): +#torrents_url = scraper.search({"name": name, "sort": "seed", "order": "desc"}) +#torrents_url = scraper.search({'name' : "walking dead s08"}) + +parameters = { + "name": name, + "category": "films_&_videos", + "subcategory": "film", + "options": { + "langue": {"francais_(vff/truefrench)"}, + }, + "sort": "seed", + "order": "desc" +} +research = scraper.search(parameters) +most_completed = scraper.most_completed() + +#print(json.dumps(research, sort_keys=True, indent=4)) +#print(json.dumps(torrents_url, sort_keys=True, indent=4)) +#print(json.dumps(most_completed, sort_keys=True, indent=4)) + +#print(open("login.key","r").read()) + +if(scraper.login(login.user, login.passwd)): print("Login success") else: print("Login failed") -torrents_url = scraper.search({'name' : "walking dead s08"}) - -print(torrents_url) +#scraper.download_from_torrent_url('') diff --git a/login.py.template b/login.py.template new file mode 100644 index 0000000..daa8bb5 --- /dev/null +++ b/login.py.template @@ -0,0 +1,2 @@ +user = "" +passwd = ""