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

14 lines
379 B
Python
Raw 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)
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