Add licence AGPL3
This commit is contained in:
parent
a67d8bec6f
commit
5650a3477b
18
crawl.py
18
crawl.py
|
@ -1,17 +1,23 @@
|
|||
################################################################################
|
||||
# Author: Poka (poka@p2p.legal)
|
||||
# Version: 0.0.1
|
||||
# License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/)
|
||||
# Git: https://git.p2p.legal/axiom-team/astroport
|
||||
################################################################################
|
||||
|
||||
import requests
|
||||
import json
|
||||
import sys
|
||||
import login
|
||||
|
||||
# Load scraper
|
||||
from yggcrawl import YggTorrentScraper
|
||||
scraper = YggTorrentScraper(requests.session())
|
||||
from yggtorrentscraper import set_yggtorrent_tld
|
||||
set_yggtorrent_tld("se")
|
||||
name = sys.argv[1]
|
||||
|
||||
#torrents_url = scraper.search({"name": name, "sort": "seed", "order": "desc"})
|
||||
#torrents_url = scraper.search({'name' : "walking dead s08"})
|
||||
|
||||
# Give paramaters to scraper
|
||||
parameters = {
|
||||
"name": name,
|
||||
"category": "films_&_videos",
|
||||
|
@ -22,15 +28,15 @@ parameters = {
|
|||
"sort": "seed",
|
||||
"order": "desc"
|
||||
}
|
||||
|
||||
# Execute scrapping
|
||||
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())
|
||||
|
||||
# Download torrent file
|
||||
if(scraper.login(login.user, login.passwd)):
|
||||
print("Login success")
|
||||
first_torrent = research[0]
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
#!/bin/bash
|
||||
################################################################################
|
||||
# Author: Poka (poka@p2p.legal)
|
||||
# Version: 0.0.1
|
||||
# License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/)
|
||||
# Git: https://git.p2p.legal/axiom-team/astroport
|
||||
################################################################################
|
||||
|
||||
echo -e "Installing Astroport"
|
||||
|
||||
|
|
Loading…
Reference in New Issue