Last active
May 23, 2024 07:57
-
-
Save roeniss/b00571d9c7f5926eb81b4dc98949b307 to your computer and use it in GitHub Desktop.
청약홈 달력 조회 curl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# [note] | |
# error message 'xargs: unterminated quote' is ignorable. | |
# [workflow] | |
# 1. daily execute the command | |
# 2. if something shows up, apply via web browser | |
# [RCEPT_SE] | |
# 01 -> APT 특별공급 | |
# 02 -> APT 1순위 | |
# 03 -> APT 2순위 | |
# 04 -> 공공지원민간임대 | |
# 05 -> 오피스텔/생활숙박시설/도시형생활주택/민간임대 | |
# 06 -> 무순위 | |
# 07 -> 취소후재공급 | |
# 08 -> 민간사전청약 APT 특별공급 | |
# 09 -> 민간사전청약 APT 1순위 | |
# 10 -> 민간사전청약 APT 2순위 | |
# 11 -> 임의공급 | |
YYYYMM=$(date +%Y%m) | |
DATA_RAW="{\"reqData\":{\"inqirePd\":\"$YYYYMM\"}}" | |
curl 'https://www.applyhome.co.kr/ai/aib/selectSubscrptCalender.do' \ | |
-H 'Content-Type: application/json' -H 'Referer: https://www.applyhome.co.kr/ai/aib/selectSubscrptCalenderView.do' \ | |
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Whale/3.25.232.19 Safari/537.36' \ | |
--data-raw $DATA_RAW |\ | |
jq ".schdulList.[] | select(.SUBSCRPT_AREA_CODE_NM ==\"서울\") | select(.IN_DATE == \"$(date '+%Y%m%d')\") | select(.RCEPT_SE | test(\"01|02|03|06|07|08|09|10|11\"))" | |
echo 'https://www.applyhome.co.kr/ai/aib/selectSubscrptCalenderView.do' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment