1
0
mirror of https://github.com/vikstrous/pirate-get synced 2025-01-10 10:04:21 +01:00
pirate-get/pirate/data.py

19 lines
489 B
Python
Raw Permalink Normal View History

2015-08-30 03:28:43 +02:00
import json
2015-08-31 04:12:07 +02:00
import pkgutil
2015-08-30 03:28:43 +02:00
2015-08-31 04:12:07 +02:00
def get_resource(filename):
return pkgutil.get_data(__package__, 'data/' + filename)
2018-09-19 07:43:56 +02:00
version = '0.3.3'
2015-08-31 04:12:07 +02:00
categories = json.loads(get_resource('categories.json').decode())
sorts = json.loads(get_resource('sorts.json').decode())
2015-08-31 04:26:18 +02:00
blacklist = set(json.loads(get_resource('blacklist.json').decode()))
2015-08-30 03:28:43 +02:00
default_headers = {'User-Agent': 'pirate get'}
default_timeout = 10
2016-08-31 21:48:25 +02:00
default_mirror = 'https://thepiratebay.org/'
mirror_list = 'https://proxybay.bz/list.txt'