/kcu-online-lecture-autoplay

๐Ÿ‘ฝ๏ธ ์ˆญ์‹ค์‚ฌ์ด๋ฒ„๋Œ€ ์Šค๋งˆํŠธ์บ ํผ์Šค ๋ฏธ์ˆ˜๊ฐ• ๊ฐ•์˜ ์ž๋™ ์ด์–ด๋“ฃ๊ธฐ

Primary LanguageTypeScript

์ˆญ์‹ค์‚ฌ์ด๋ฒ„๋Œ€ ์˜จ๋ผ์ธ ๊ฐ•์˜ ์†๊ฐ€๋ฝ ๊นŒ๋‹ฅ ์•ˆํ•˜๊ณ  ์ด์–ด ๋“ฃ๊ธฐ

๋งค๋ฒˆ ๊ฐ•์˜ ๋๋‚ ๋•Œ๋งˆ๋‹ค ๋งˆ์šฐ์Šค ์›€์ง์ด๋Š”๊ฒŒ ๊ท€์ฐฎ์•„์„œ ๋งŒ๋“ค์—ˆ์Šต๋‹ˆ๋‹ค. ์ ˆ๋Œ€ ๋ฐค์— ํ‹€์–ด๋†“๊ณ  ์ž˜๋ ค๊ณ  ํ•˜๋Š” ๋ชฉ์ ์ด ์•„๋‹ˆ๋‹ˆ ์˜คํ•ด๋Š” ์‚ผ๊ฐ€ ํ•ด์ฃผ์„ธ์š” ^^~

์„ค์น˜

๋จผ์ € ์ˆญ์‹ค์‚ฌ์ด๋ฒ„๋Œ€๋Š” ์•ˆ์ „ํ•˜๊ณ  ๊ฐ•๋ ฅํ•œ ์›นํ”Œ๋ ˆ์ด์–ด๋ฅผ ์„ค์น˜ํ•˜์ง€ ์•Š์œผ๋ฉด ๋ณผ ์ˆ˜ ์—†๊ธฐ ๋•Œ๋ฌธ์— ์„ค์น˜ํ•ด์ค๋‹ˆ๋‹ค. ํ•ด๋‹น ๋‹ค์šด๋กœ๋“œ ํŽ˜์ด์ง€์—์„œ ํ…Œ์ŠคํŠธ ์˜์ƒ์ด ์ œ๋Œ€๋กœ ๋‚˜์˜ค๋Š”์ง€ ํ™•์ธํ•ด์ฃผ์„ธ์š”.

# your id of https://www.kcu.ac/login/login.asp?loginType=05
KCU_ID=์ˆญ์‹ค์‚ฌ์ด๋ฒ„๋Œ€ํ•™๋ฒˆ
# your password of https://www.kcu.ac/login/login.asp?loginType=05
KCU_PASSWORD=์ˆญ์‹ค์‚ฌ์ด๋ฒ„๋Œ€๋น„๋ฐ€๋ฒˆํ˜ธ
# using headless = 1
HEADLESS=0
# your browser path
EXECUTABLE_BROWSER_PATH=C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

.env.example ํŒŒ์ผ์„ .env ํŒŒ์ผ๋กœ ๋ณต์‚ฌํ•ด์„œ ๊ฐ’์„ ์ฑ„์›Œ๋„ฃ์–ด์ฃผ์„ธ์š”. EXECUTABLE_BROWSER_PATH๊ฐ’์ด ๋ญ๋ƒ๋ฉด ์ •๋ง ์•ˆ์ „ํ•˜๊ณ  ๊ฐ•๋ ฅํ•œ ์›นํ”Œ๋ ˆ์ด์–ด๐Ÿ‘Ž๋Š” ์ผ๋ฐ˜์ ์ธ ๋ธŒ๋ผ์šฐ์ €์—์„œ๋งŒ ์žฌ์ƒ๋˜๊ธฐ ๋•Œ๋ฌธ์—, ์›นํ”Œ๋ ˆ์ด์–ด๋ฅผ ์‹ค์ œ๋กœ ์„ค์น˜ํ•˜๊ณ  ์‹คํ–‰ํ–ˆ๋˜ ๋ธŒ๋ผ์šฐ์ € ๊ฒฝ๋กœ๋ฅผ ๋„ฃ์Šต๋‹ˆ๋‹ค. ์˜ˆ์ œ์—์„œ๋Š” ์œˆ๋„์šฐ ํ™˜๊ฒฝ์—์„œ์˜ ํฌ๋กฌ ๊ฒฝ๋กœ์ž…๋‹ˆ๋‹ค.

git clone https://github.com/minuukang/kcu-online-lecture-autoplay
cd kcu-online-lecture-autoplay
npm i
npm start

image

์ด์ œ ์žฌ์ƒ์„ ์ˆœ์ฐจ์ ์œผ๋กœ ์ง„ํ–‰ํ•ฉ๋‹ˆ๋‹ค. ํ•ด๋‹น ์‚ฌ์ดํŠธ ๊ฐ•์˜์ฒดํฌ๊ฐ€ ๊ฐ„ํ—์ ์œผ๋กœ ์™„๋ฃŒ ์ฒ˜๋ฆฌ๊ฐ€ ๋˜์ง€ ์•Š๋Š” ๊ฒฝ์šฐ๊ฐ€ ๋งŽ๊ธฐ์—, ์‹คํ–‰ ํ›„ ๊ฐ•์˜๋ฅผ ๋ชจ๋‘ ๋“ค์—ˆ๋‹ค๋Š” ๊ฒƒ์„ ์žฌํ™•์ธ ํ›„ ํ”„๋กœ๊ทธ๋žจ์ด ์ข…๋ฃŒ๋ฉ๋‹ˆ๋‹ค.

(์žˆ์„์ง€ ๋ชจ๋ฅด๊ฒ ์ง€๋งŒ!) ๋™์˜์ƒ ์žฌ์ƒ์„ ๋ฐฑ๊ทธ๋ผ์šด๋“œ์—์„œ ํ•˜๊ณ  ์‹ถ๋‹ค๋ฉด .env ์—์„œ HEADLESS ์˜ต์…˜์„ "1" ๋กœ ์ฑ„์›Œ๋†“์œผ์„ธ์š”. ๋ธŒ๋ผ์šฐ์ €๋ฅผ headless๋กœ ์ „ํ™˜ํ•ฉ๋‹ˆ๋‹ค.