Update torrent list
Removed unused torrents Fixed small bug in rss.py
This commit is contained in:
parent
926880a84f
commit
15896080db
3 changed files with 2933 additions and 7603 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -27,3 +27,6 @@ codekit-config.json
|
||||||
.sass-cache
|
.sass-cache
|
||||||
_asset_bundler_cache
|
_asset_bundler_cache
|
||||||
_site
|
_site
|
||||||
|
|
||||||
|
# torrent stuff
|
||||||
|
torrents
|
13
rss.py
13
rss.py
|
@ -30,12 +30,13 @@ with open(rss, "w") as xml:
|
||||||
infohash = hashlib.sha1(bencodepy.encode(tor[b"info"])).hexdigest().upper()
|
infohash = hashlib.sha1(bencodepy.encode(tor[b"info"])).hexdigest().upper()
|
||||||
magp = {"xt": "urn:btih:{0}".format(infohash), "dn": tor[b"info"][b"name"], "xl": tor[b"info"][b"length"]}
|
magp = {"xt": "urn:btih:{0}".format(infohash), "dn": tor[b"info"][b"name"], "xl": tor[b"info"][b"length"]}
|
||||||
magstr = urllib.parse.urlencode(magp)
|
magstr = urllib.parse.urlencode(magp)
|
||||||
for anncl in tor[b"announce-list"]:
|
if b'announce-list' in tor:
|
||||||
if isinstance(anncl, list):
|
for anncl in tor[b'announce-list']:
|
||||||
for annc in anncl:
|
if isinstance(anncl, list):
|
||||||
trackers.append(annc.decode("utf-8"))
|
for annc in anncl:
|
||||||
else:
|
trackers.append(annc.decode("utf-8"))
|
||||||
trackers.append(anncl.decode("utf-8"))
|
else:
|
||||||
|
trackers.append(anncl.decode("utf-8"))
|
||||||
length = tor[b"info"][b"length"]
|
length = tor[b"info"][b"length"]
|
||||||
name = tor[b"info"][b"name"].decode("utf-8")
|
name = tor[b"info"][b"name"].decode("utf-8")
|
||||||
ts = tor[b"creation date"]
|
ts = tor[b"creation date"]
|
||||||
|
|
Loading…
Reference in a new issue