Skip to content

Commit ce53862

Browse files
committed
Merge branch 'add-phantom' of github.com:Fijxu/instances-libredirect into Fijxu-add-phantom
2 parents 4b967e7 + bf3847a commit ce53862

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

services/other.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,3 +379,19 @@ def soundcloak(mightyList):
379379
except Exception:
380380
fetchCache('soundcloak', mightyList)
381381
logging.error(traceback.format_exc())
382+
383+
def phantom(mightyList):
384+
try:
385+
r = requests.get('https://codeberg.org/phantom-org/phantom-instances/raw/branch/master/instances.json')
386+
rJson = json.loads(r.text)
387+
_list = {
388+
'clearnet': [],
389+
}
390+
for instance in rJson['instances']:
391+
_list['clearnet'].append(instance)
392+
393+
mightyList['phantom'] = _list
394+
print(Fore.GREEN + 'Fetched ' + Style.RESET_ALL + 'phantom')
395+
except Exception:
396+
fetchCache('phantom', mightyList)
397+
logging.error(traceback.format_exc())

0 commit comments

Comments
 (0)