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 requests
|
||||||
import json
|
import json
|
||||||
import sys
|
import sys
|
||||||
import login
|
import login
|
||||||
|
|
||||||
|
# Load scraper
|
||||||
from yggcrawl import YggTorrentScraper
|
from yggcrawl import YggTorrentScraper
|
||||||
scraper = YggTorrentScraper(requests.session())
|
scraper = YggTorrentScraper(requests.session())
|
||||||
from yggtorrentscraper import set_yggtorrent_tld
|
from yggtorrentscraper import set_yggtorrent_tld
|
||||||
set_yggtorrent_tld("se")
|
set_yggtorrent_tld("se")
|
||||||
name = sys.argv[1]
|
name = sys.argv[1]
|
||||||
|
|
||||||
#torrents_url = scraper.search({"name": name, "sort": "seed", "order": "desc"})
|
# Give paramaters to scraper
|
||||||
#torrents_url = scraper.search({'name' : "walking dead s08"})
|
|
||||||
|
|
||||||
parameters = {
|
parameters = {
|
||||||
"name": name,
|
"name": name,
|
||||||
"category": "films_&_videos",
|
"category": "films_&_videos",
|
||||||
|
@ -22,15 +28,15 @@ parameters = {
|
||||||
"sort": "seed",
|
"sort": "seed",
|
||||||
"order": "desc"
|
"order": "desc"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Execute scrapping
|
||||||
research = scraper.search(parameters)
|
research = scraper.search(parameters)
|
||||||
most_completed = scraper.most_completed()
|
most_completed = scraper.most_completed()
|
||||||
|
|
||||||
#print(json.dumps(research, sort_keys=True, indent=4))
|
#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(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)):
|
if(scraper.login(login.user, login.passwd)):
|
||||||
print("Login success")
|
print("Login success")
|
||||||
first_torrent = research[0]
|
first_torrent = research[0]
|
||||||
|
|
|
@ -1,4 +1,10 @@
|
||||||
#!/bin/bash
|
#!/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"
|
echo -e "Installing Astroport"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue