Тесты парсера

This commit is contained in:
justuser31 2024-04-28 21:02:09 +03:00
parent 2fa9b57ce3
commit 5c6917e40e

13
reworked/parse.py Normal file
View File

@ -0,0 +1,13 @@
from requests import get
from yaml import load, SafeLoader
def parse_yml(url = 'https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/Resources/Prototypes/Recipes/Reactions/medicine.yml'):
yml = load(get(url).content.decode('utf-8'), Loader=SafeLoader)
return yml
def parse_ftl(url = 'https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/Resources/Locale/ru-RU/reagents/meta/medicine.ftl'):
raw = get(url).content.decode('utf-8')
print(raw)
parse_ftl()