Jeju National University meal data crawler
Project description
jejunuMeals
제주대학교 학식 조회 모듈
Lookup meals data for Jeju National University.
Install
$ pip install jejunuMeals
Usage
>>> from jejunuMeals import JejunuMeals
>>> from pprint import pprint
>>> pprint(JejunuMeals().menus())
{0: {'저녁': {'양식': ['없음'],
'정식': ['검정쌀밥', '얼큰열무국', '돼지고기야채볶음(pork)', '오이된장무침', '김치'],
'중식': ['없음'],
'특식': ['없음']},
'점심': {'양식': ['치즈오븐스파게티'],
'정식': ['베이컨야채볶음밥(pork)', '달걀파국', '볶음우동', '김치'],
'중식': ['없음'],
'특식': ['검정쌀밥',
'쇠고기된장찌개(beef)',
'순살양념치킨(chicken)',
'양배추사과샐러드',
'콩나물무숙채',
'김치']}},
1: {'저녁': {'양식': ['없음'],
'정식': ['쌀밥', '어묵탕', '쇠고기야채볶음(beef)', '톳무침', '김치'],
'중식': ['없음'],
'특식': ['없음']},
'점심': {'양식': ['등심돈가스(pork)/스프', '양배추샐러드', '단무지/김치'],
'정식': ['에그스크램블볶음밥', '무된장국', '별미떡볶음', '김치'],
'중식': ['없음'],
'특식': ['보리밥', '돼지갈비찜(pork)', '무된장국', '편마늘멸치볶음', '브로콜리맛살무침', '김치']}},
2: {'저녁': {'양식': ['없음'],
'정식': ['차조밥', '김치찌개(pork)', '생선가스/타타르소스', '깻잎순무침', '김치'],
'중식': ['없음'],
'특식': ['없음']},
'점심': {'양식': ['크림파스타'],
'정식': ['닭가슴살카레라이스(chicken)', '취나물된장국', '아몬드쥐치채볶음', '김치'],
'중식': ['없음'],
'특식': ['비빔밥/약고추장(pork)', '취나물된장국', '어묵볶음', '오이생채', '김치', '요구르트']}},
3: {'저녁': {'양식': ['없음'],
'정식': ['쌀밥', '김치콩나물국', '닭고기떡조림(chicken)', '옛날소시지전', '김치'],
'중식': ['없음'],
'특식': ['없음']},
'점심': {'양식': ['치즈오븐스파게티'],
'정식': ['제육덮밥(pork)', '유채된장국', '부추양파겉절이', '김치'],
'중식': ['없음'],
'특식': ['현미밥', '해물순두부뚝배기', '순대야채볶음', '피망잡채(beef)', '무말랭이무침', '김치']}},
4: {'저녁': {'양식': ['없음'],
'정식': ['혼합잡곡밥', '동태찌개', '돼지고기두루치기(pork)', '유채나물무침', '김치'],
'중식': ['없음'],
'특식': ['없음']}
API
JejunuMeals().menus()
Fetch meal data of specific weekday.
>>> from jejunuMeals import JejunuMeals
>>> from datetime import date
>>> from pprint import pprint
>>> pprint(JejunuMeals().menus(date.today().weekday()))
{'저녁': {'양식': ['없음'],
'정식': ['쌀밥', '어묵탕', '쇠고기야채볶음(beef)', '톳무침', '김치'],
'중식': ['없음'],
'특식': ['없음']},
'점심': {'양식': ['등심돈가스(pork)/스프', '양배추샐러드', '단무지/김치'],
'정식': ['에그스크램블볶음밥', '무된장국', '별미떡볶음', '김치'],
'중식': ['없음'],
'특식': ['보리밥', '돼지갈비찜(pork)', '무된장국', '편마늘멸치볶음', '브로콜리맛살무침', '김치']}}
Parameter (optional)
The weekday on which you want to fetch meal data.
This value only valid in between 0 and 4. if empty or greater than 4, return all menus.
JejunuMeals().daily()
Just an alias of JejunuMeals().menus()
Save to yaml
You shoud install before pip install pyYaml
import yaml
noalias = yaml.dumper.SafeDumper
noalias.ignore_aliases = lambda self, data: True
with open('output.yaml', 'w') as outfile:
yaml.dump(JejunuMeals().menus(), outfile, default_flow_style=False, allow_unicode=True, Dumper=noalias)
jejunuMeals is primarily distributed under the terms of the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
File details
Details for the file jejunuMeals-1.4-py3-none-any.whl
.
File metadata
- Download URL: jejunuMeals-1.4-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f04b989f905401c9ed02ffc728b6ab1323d45e0765f481000f1fc7657a9f6dd |
|
MD5 | 75cffd96b3d071063dfc5fdbf5542493 |
|
BLAKE2b-256 | 39b4da36b109db26840338b08d55c3de5aac8490cb0d379c91001cdcce3be788 |