에브리 타임 크롤링
from urllib.request import urlopen
from bs4 import BeautifulSoup
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
from matplotlib import font_manager, rc
path = "c:/Windows/Fonts/malgun.ttf"
font_name = font_manager.FontProperties(fname=path).get_name()
rc('font', family=font_name)
from selenium import webdriver
from selenium.webdriver.common.by import By
import urllib.request
import urllib.parse
import time
import re #정규식
url = 'https://everytime.kr/timetable'
driver = webdriver.Chrome()
driver.get(url)
time.sleep(3)
user_id = input('에브리타임 아이디를 입력해주세요.: ')
et_login = driver.find_element(By.NAME, "id")
et_login.clear()
et_login.send_keys(user_id)
user_pw = input('에브리타임 비밀번호를 입력해주세요.: ')
et_login = driver.find_element(By.NAME, "password")
et_login.clear()
et_login.send_keys(user_pw) #자신의 비번을 넣으세요
driver.find_element(By.XPATH, '//input[@type="submit" and @value="에브리타임 로그인"]').click()
time.sleep(3)
while True:
try:
driver.find_element_by_xpath("""//*[@id="sheet"]/ul/li[3]/a""").click()
time.sleep(2)
break
except:
continue
timetable_all = pd.DataFrame()
timetable_all
graph = {}
while True:
try:
driver.find_element_by_xpath("""//*[@id="container"]/ul/li[1]""").click()
time.sleep(2)
break
except:
continue
for i in range(9):
while True:
try:
driver.find_element_by_xpath("""//*[@id="subjects"]/div[1]/a[4]""").click()
time.sleep(2)
break
except:
continue
while i == 0:
try:
driver.find_element_by_xpath("""//*[@id="subjectCategoryFilter"]/div/ul/li[2]""").click()
time.sleep(2)
break
except:
continue
while True:
try:
driver.find_element_by_xpath("""//*[@id="subjectCategoryFilter"]/div/ul/ul[2]/li["""+str((i+1))+"""]""").click()
time.sleep(2)
break
except:
continue
# while True:
# try:
# driver.find_element_by_xpath("""//*[@id="subjectCategoryFilter"]/div/ul/ul[2]/ul["""+str((i+1))+"""]/li""").click()
# time.sleep(2)
# break
# except:
# continue
page = driver.page_source
soup = BeautifulSoup(page, "html.parser")
contents = []
tmp = soup.find('div','list').find('tbody').find_all('td')
for i in tmp:
tmp = i.get_text()
contents.append(tmp)
contents = np.array(contents)
column = []
tmp = tmp = soup.find('div','list').find('thead').find_all('th')
for i in tmp:
tmp = str(i).lstrip('<th>').split('<div>')
column.append(tmp[0])
timetable = pd.DataFrame(contents.reshape(len(contents)//12,12), columns=column)
del(timetable['계획서']) ;del(timetable['강의평'])
major = soup.find('a','item active').get_text().split(':')[1]
graph[str(major)] = len(timetable)
timetable_all = pd.concat([timetable_all,timetable],ignore_index=True)
timetable.to_excel('../data/19년 1학기 '+major+' 강좌.xls',encoding = 'utf8',sheet_name=major,index = False) # 학과 별로 저장
timetable_all.to_excel('../data/19년 1학기 공과대학 강좌.xls',encoding = 'utf8',sheet_name=major,index = False) # 공대 전체 데이터 저장
time.sleep(2)
driver.close()
--------------------------------------------------------------------------- KeyboardInterrupt Traceback (most recent call last) Cell In[5], [line 23](vscode-notebook-cell:?execution_count=5&line=23) [21](vscode-notebook-cell:?execution_count=5&line=21) break [22](vscode-notebook-cell:?execution_count=5&line=22) except: ---> [23](vscode-notebook-cell:?execution_count=5&line=23) continue [24](vscode-notebook-cell:?execution_count=5&line=24) timetable_all = pd.DataFrame() [25](vscode-notebook-cell:?execution_count=5&line=25) timetable_all KeyboardInterrupt:
driver = webdriver.Chrome()
# 에브리타임 로그인 페이지 접속
url = 'https://everytime.kr/timetable'
driver.get(url)
time.sleep(3)
# 사용자 입력 받기
user_id = input('에브리타임 아이디를 입력해주세요.: ')
et_login = driver.find_element(By.NAME, "id")
et_login.clear()
et_login.send_keys(user_id)
user_pw = input('에브리타임 비밀번호를 입력해주세요.: ')
et_pw = driver.find_element(By.NAME, "password")
et_pw.clear()
et_pw.send_keys(user_pw)
# 로그인 버튼 클릭
driver.find_element(By.XPATH, '//input[@type="submit" and @value="에브리타임 로그인"]').click()
time.sleep(3)
# 특정 시트로 이동
while True:
try:
driver.find_element(By.XPATH, """//*[@id="sheet"]/ul/li[3]/a""").click() #<li class="button search">수업 목록에서 검색</li>
time.sleep(2)
break
except:
continue
timetable_all = pd.DataFrame()
graph = {}
# 데이터 추출을 위한 반복
for i in range(9):
while True:
try:
driver.find_element(By.XPATH, """//*[@id="subjects"]/div[1]/a[4]""").click() #<a class="item" data-id="category"><span class="key">전공/영역:</span><span class="value">전체</span><span class="reset"></span></a>
time.sleep(2)
break
except:
continue
if i == 0:
while True:
try:
driver.find_element(By.XPATH, """//*[@id="subjectCategoryFilter"]/div/ul/li[2]""").click()
time.sleep(2)
break
except:
continue
while True:
try:
driver.find_element(By.XPATH, f"""//*[@id="subjectCategoryFilter"]/div/ul/ul[2]/li[{i+1}]""").click()
time.sleep(2)
break
except:
continue
# 페이지 소스 가져오기 및 파싱
page = driver.page_source
soup = BeautifulSoup(page, "html.parser")
contents = []
# 데이터 추출
tmp = soup.find('div', class_='list').find('tbody').find_all('td')
for td in tmp:
contents.append(td.get_text())
contents = np.array(contents)
# 칼럼 정보 추출
column = []
headers = soup.find('div', class_='list').find('thead').find_all('th')
for th in headers:
column.append(th.get_text().strip())
# DataFrame 생성
timetable = pd.DataFrame(contents.reshape(len(contents)//12, 12), columns=column)
timetable.drop(columns=['계획서', '강의평'], inplace=True)
# 학과 정보 추출
major = soup.find('a', class_='item active').get_text().split(':')[1]
graph[major] = len(timetable)
# DataFrame 합치기
timetable_all = pd.concat([timetable_all, timetable], ignore_index=True)
timetable.to_excel(f'../data/19년 1학기 {major} 강좌.xls', encoding='utf8', sheet_name=major, index=False)
# 전체 데이터 저장
timetable_all.to_excel('../data/19년 1학기 공과대학 강좌.xls', encoding='utf8', sheet_name='공과대학', index=False)
# WebDriver 종료
time.sleep(2)
driver.close()
#-*- coding:utf-8 -*-
from selenium import webdriver
from bs4 import BeautifulSoup
from time import sleep
from openpyxl import Workbook,load_workbook
# Chrome의 경우 | 아까 받은 chromedriver의 위치를 지정해준다.
driver = webdriver.Chrome()
# url에 접근한다.
driver.get('https://everytime.kr/timetable')
# 암묵적으로 웹 자원 로드를 위해 5초까지 기다려 준다.
driver.implicitly_wait(5)
# 아이디/비밀번호를 입력해준다.
driver.find_element(By.NAME,'id').send_keys('gnbupi')
driver.find_element(By.NAME,'password').send_keys('rlatkddn1212')
sleep(2)
# 로그인 버튼을 눌러주자.
driver.find_element(By.XPATH, '//input[@type="submit" and @value="에브리타임 로그인"]').click()
#수업 목록에서 검색 클릭
driver.find_element(By.XPATH,'//li[@class="button search"]').click()
driver.find_element(By.CSS_SELECTOR, 'span.key').click()
#팝업창 닫기
sleep(2)
#driver.find_element_by_xpath('//*[@id="sheet"]/ul/li[3]/a').click()
sleep(2)
def expand_all_categories():
while True:
# 모든 "parent" 항목 찾기
parent_elements = driver.find_elements(By.CSS_SELECTOR, 'li.parent')
expanded_any = False
for parent in parent_elements:
if 'unfolded' not in parent.get_attribute('class'):
parent.click()
sleep(1) # 페이지 업데이트 대기
expanded_any = True
if not expanded_any:
break
results = []
count=0
name=[]
name.append('id')
name.append('department')
name.append('grade')
name.append('course_type')
name.append('course_number')
name.append('course_name')
name.append('credits')
name.append('capacity')
name.append('professor')
name.append('class_time')
name.append('class_place')
name.append('class_type')
results.append(name)
# 모든 <li class="child"> 요소 클릭
def click_all_children():
while True:
# 모든 "child" 항목 찾기
child_elements = driver.find_elements(By.CSS_SELECTOR, 'li.child')
if not child_elements:
break
for child in child_elements:
expand_all_categories()
child.click()
sleep(2) # 페이지 업데이트 대기
# 다시 "child" 항목을 로드하기 위해 스크롤 할 수도 있습니다
driver.execute_script('arguments[0].scrollIntoView(true);', child)
sleep(1)
pre_count = 0
#스크롤 맨아래로 내리기
while True:
#tr요소 접근
element = driver.find_elements(By.CSS_SELECTOR, "#subjects > div.list > table > tbody > tr")
# tr 마지막 요소 접근
result = element[-1]
#마지막요소에 focus주기
driver.execute_script('arguments[0].scrollIntoView(true);',result)
sleep(2)
#현재 접근한 요소의 갯수
current_count = len(element)
if pre_count == current_count:
break
#같지않다면
pre_count = current_count
html = driver.page_source
soup = BeautifulSoup(html, 'html.parser')
trs = soup.select('#subjects > div.list > table > tbody > tr')
for tr in trs:
global count
result=[]
tds = tr.select('#subjects > div.list > table > tbody > tr > td')
count=count+1
result.append(count) #id
result.append(child) #학과
result.append(tds[6].text) #학년
result.append(tds[5].text) #구분
result.append(tds[0].text) #과목코드
result.append(tds[1].text) #과목명
result.append(tds[7].text) #학점
result.append(tds[10].text) #정원
result.append(tds[2].text) #교수
result.append(tds[3].text) #강의시간
result.append(tds[4].text) #강의실
result.append(tds[12].text) #비고
results.append(result)
click_all_children()
#값이 들어있다면!
if results:
print("성공!!")
excel_column = 9
write_wb = Workbook()
write_ws = write_wb.create_sheet('result.xls')
for data in results:
write_ws = write_wb.active
write_ws.append(data)
write_wb.save('C:/Users/gnbup/Desktop/code/deeplearning/result.csv')
--------------------------------------------------------------------------- KeyboardInterrupt Traceback (most recent call last) Cell In[5], [line 23](vscode-notebook-cell:?execution_count=5&line=23) [21](vscode-notebook-cell:?execution_count=5&line=21) break [22](vscode-notebook-cell:?execution_count=5&line=22) except: ---> [23](vscode-notebook-cell:?execution_count=5&line=23) continue [24](vscode-notebook-cell:?execution_count=5&line=24) timetable_all = pd.DataFrame() [25](vscode-notebook-cell:?execution_count=5&line=25) timetable_all KeyboardInterrupt:
--------------------------------------------------------------------------- ElementNotInteractableException Traceback (most recent call last) Cell In[43], [line 156](vscode-notebook-cell:?execution_count=43&line=156) [147](vscode-notebook-cell:?execution_count=43&line=147) result.append(tds[12].text) #비고 [150](vscode-notebook-cell:?execution_count=43&line=150) results.append(result) --> [156](vscode-notebook-cell:?execution_count=43&line=156) click_all_children() [167](vscode-notebook-cell:?execution_count=43&line=167) #값이 들어있다면! [168](vscode-notebook-cell:?execution_count=43&line=168) if results: Cell In[43], [line 87](vscode-notebook-cell:?execution_count=43&line=87) [83](vscode-notebook-cell:?execution_count=43&line=83) for child in child_elements: [86](vscode-notebook-cell:?execution_count=43&line=86) expand_all_categories() ---> [87](vscode-notebook-cell:?execution_count=43&line=87) child.click() [88](vscode-notebook-cell:?execution_count=43&line=88) sleep(2) # 페이지 업데이트 대기 [89](vscode-notebook-cell:?execution_count=43&line=89) # 다시 "child" 항목을 로드하기 위해 스크롤 할 수도 있습니다 File c:\Users\gnbup\.conda\envs\condatest\lib\site-packages\selenium\webdriver\remote\webelement.py:94, in WebElement.click(self) [92](file:///C:/Users/gnbup/.conda/envs/condatest/lib/site-packages/selenium/webdriver/remote/webelement.py:92) def click(self) -> None: [93](file:///C:/Users/gnbup/.conda/envs/condatest/lib/site-packages/selenium/webdriver/remote/webelement.py:93) """Clicks the element.""" ---> [94](file:///C:/Users/gnbup/.conda/envs/condatest/lib/site-packages/selenium/webdriver/remote/webelement.py:94) self._execute(Command.CLICK_ELEMENT) File c:\Users\gnbup\.conda\envs\condatest\lib\site-packages\selenium\webdriver\remote\webelement.py:395, in WebElement._execute(self, command, params) [393](file:///C:/Users/gnbup/.conda/envs/condatest/lib/site-packages/selenium/webdriver/remote/webelement.py:393) params = {} [394](file:///C:/Users/gnbup/.conda/envs/condatest/lib/site-packages/selenium/webdriver/remote/webelement.py:394) params["id"] = self._id --> [395](file:///C:/Users/gnbup/.conda/envs/condatest/lib/site-packages/selenium/webdriver/remote/webelement.py:395) return self._parent.execute(command, params)
...
(No symbol) [0x00007FF7678639A2] (No symbol) [0x00007FF76785A3FF] BaseThreadInitThunk [0x00007FFA66B2257D+29] RtlUserThreadStart [0x00007FFA67F2AF28+40]
Output is truncated. View as a [scrollable element](command:cellOutput.enableScrolling?ce4be2fa-00fc-41b5-832f-2e06b4f7fd1a) or open in a [text editor](command:workbench.action.openLargeOutput?ce4be2fa-00fc-41b5-832f-2e06b4f7fd1a). Adjust cell output [settings](command:workbench.action.openSettings?%5B%22%40tag%3AnotebookOutputLayout%22%5D)...
현제 학과: 기초교양 현제 학과: 핵심1영역 현제 학과: 핵심2영역 현제 학과: 핵심3영역 현제 학과: 핵심4영역 현제 학과: 핵심4-1영역(이공계핵심기초) 현제 학과: 일반교양 현제 학과: 교직 현제 학과: 자유선택 현제 학과: 컴퓨터소프트웨어특성화대학 현제 학과: 컴퓨터정보공학과 현제 학과: 인공지능융합학과 현제 학과: 임베디드소프트웨어학과 현제 학과: 소프트웨어학과 현제 학과: IT융합통신공학과 현제 학과: 생명과학과 현제 학과: 생물학과 현제 학과: 해양수산공공인재학과 현제 학과: 해양생명과학과 현제 학과: 해양생물자원학과 현제 학과: 수산생명의학과 현제 학과: 식품영양학과 현제 학과: 기관공학과 현제 학과: 식품생명공학과 현제 학과: 경영학부
...
현제 학과: 디지털포렌식전공 현제 학과: KCU 현제 학과: OCU 성공!!
Output is truncated. View as a [scrollable element](command:cellOutput.enableScrolling?ea7919c6-b7c9-40ff-a788-f0817576fd15) or open in a [text editor](command:workbench.action.openLargeOutput?ea7919c6-b7c9-40ff-a788-f0817576fd15). Adjust cell output [settings](command:workbench.action.openSettings?%5B%22%40tag%3AnotebookOutputLayout%22%5D)...
학과 이름: 기초교양 학과 이름: 핵심1영역 학과 이름: 핵심2영역 학과 이름: 핵심3영역 학과 이름: 핵심4영역 학과 이름: 핵심4-1영역(이공계핵심기초) 학과 이름: 일반교양 학과 이름: 교직 학과 이름: 자유선택 학과 이름: 컴퓨터소프트웨어특성화대학 학과 이름: 컴퓨터정보공학과 학과 이름: 인공지능융합학과 학과 이름: 임베디드소프트웨어학과 학과 이름: 소프트웨어학과 학과 이름: IT융합통신공학과 학과 이름: 생명과학과 학과 이름: 생물학과 학과 이름: 해양수산공공인재학과 학과 이름: 해양생명과학과 학과 이름: 해양생물자원학과 학과 이름: 수산생명의학과 학과 이름: 식품영양학과 학과 이름: 기관공학과 학과 이름: 식품생명공학과 학과 이름: 경영학부
...
학과 이름: 빅데이터공학전공 학과 이름: 디지털포렌식전공 학과 이름: KCU 학과 이름: OCU
Output is truncated. View as a [scrollable element](command:cellOutput.enableScrolling?108f7c4e-a9b2-4342-943a-e6e848f5d749) or open in a [text editor](command:workbench.action.openLargeOutput?108f7c4e-a9b2-4342-943a-e6e848f5d749). Adjust cell output [settings](command:workbench.action.openSettings?%5B%22%40tag%3AnotebookOutputLayout%22%5D)...
--------------------------------------------------------------------------- ModuleNotFoundError Traceback (most recent call last) ~\AppData\Local\Temp\ipykernel_14420\1371954404.py in <module> ----> 1 from seleniumwire import webdriver 2 from selenium.webdriver.common.by import By 3 from selenium.common import exceptions 4 from getpass import getpass 5 import requests ModuleNotFoundError: No module named 'seleniumwire'
# -*- coding:utf-8 -*-
from selenium import webdriver
from selenium.webdriver.common.by import By
from bs4 import BeautifulSoup
from time import sleep
from openpyxl import Workbook
# 웹 드라이버 설정
driver = webdriver.Chrome()
# 웹 페이지 열기
driver.get('https://everytime.kr/timetable')
driver.implicitly_wait(5)
# 로그인
driver.find_element(By.NAME, 'id').send_keys('gnbupi')
driver.find_element(By.NAME, 'password').send_keys('rlatkddn1212')
sleep(2)
driver.find_element(By.XPATH, '//input[@type="submit" and @value="에브리타임 로그인"]').click()
# 수업 목록에서 검색 클릭
driver.find_element(By.XPATH, '//li[@class="button search"]').click()
# 팝업창 닫기
sleep(2)
driver.find_element(By.CSS_SELECTOR, 'span.key').click()
sleep(1)
# 모든 카테고리 확장
def expand_all_categories():
while True:
parent_elements = driver.find_elements(By.CSS_SELECTOR, 'li.parent')
expanded_any = False
for parent in parent_elements:
if 'unfolded' not in parent.get_attribute('class'):
parent.click()
sleep(1)
expanded_any = True
if not expanded_any:
break
results = []
count = 0
# 엑셀 열 헤더 추가
name = [
'id', 'department', 'grade', 'course_type', 'course_number', 'course_name',
'credits', 'capacity', 'professor', 'class_time', 'class_place', 'class_type'
]
results.append(name)
# 모든 <li class="child"> 요소 클릭
def click_all_children():
child_elements = driver.find_elements(By.CSS_SELECTOR, 'li.child')
for i in range(len(child_elements)):
# expand_all_categories 함수를 호출하여 페이지를 업데이트하기 전에
# 매번 child_elements 리스트를 새로 가져옵니다.
expand_all_categories()
child_elements = driver.find_elements(By.CSS_SELECTOR, 'li.child')
child = child_elements[i]
try:
# <a> 태그가 있는 경우
department_name = child.find_element(By.CSS_SELECTOR, 'a').text
except:
# <a> 태그가 없는 경우, 직접 <li> 요소의 텍스트 사용
department_name = child.text
print(f"현제 학과: {department_name}")
driver.execute_script('arguments[0].scrollIntoView(true);', child)
sleep(1) # 페이지 업데이트 대기
child.click()
sleep(2)
pre_count = 0
# 스크롤 맨 아래로 내리기
while True:
element = driver.find_elements(By.CSS_SELECTOR, "#subjects > div.list > table > tbody > tr")
result = element[-1]
driver.execute_script('arguments[0].scrollIntoView(true);', result)
sleep(2)
current_count = len(element)
if pre_count == current_count:
break
pre_count = current_count
html = driver.page_source
soup = BeautifulSoup(html, 'html.parser')
trs = soup.select('#subjects > div.list > table > tbody > tr')
for tr in trs:
global count
result = []
tds = tr.find_all('td')
count += 1
result.append(count) # id
result.append(department_name) # 학과
if len(tds) > 12:
result.append(tds[6].text) # 학년
result.append(tds[5].text) # 구분
result.append(tds[0].text) # 과목코드
result.append(tds[1].text) # 과목명
result.append(tds[7].text) # 학점
result.append(tds[10].text) # 정원
result.append(tds[2].text) # 교수
result.append(tds[3].text) # 강의시간
result.append(tds[4].text) # 강의실
result.append(tds[12].text) # 비고
results.append(result)
# 다음 child 요소로 이동하기 전에 다시 'span.key'를 클릭합니다.
driver.find_element(By.CSS_SELECTOR, 'span.key').click()
sleep(1)
click_all_children()
# 엑셀 파일 저장
if results:
print("성공!!")
write_wb = Workbook()
write_ws = write_wb.active
for data in results:
write_ws.append(data)
write_wb.save('C:/Users/gnbup/Desktop/code/deeplearning/result.csv')
driver.quit()
--------------------------------------------------------------------------- KeyboardInterrupt Traceback (most recent call last) Cell In[5], [line 23](vscode-notebook-cell:?execution_count=5&line=23) [21](vscode-notebook-cell:?execution_count=5&line=21) break [22](vscode-notebook-cell:?execution_count=5&line=22) except: ---> [23](vscode-notebook-cell:?execution_count=5&line=23) continue [24](vscode-notebook-cell:?execution_count=5&line=24) timetable_all = pd.DataFrame() [25](vscode-notebook-cell:?execution_count=5&line=25) timetable_all KeyboardInterrupt:
--------------------------------------------------------------------------- ElementNotInteractableException Traceback (most recent call last) Cell In[43], [line 156](vscode-notebook-cell:?execution_count=43&line=156) [147](vscode-notebook-cell:?execution_count=43&line=147) result.append(tds[12].text) #비고 [150](vscode-notebook-cell:?execution_count=43&line=150) results.append(result) --> [156](vscode-notebook-cell:?execution_count=43&line=156) click_all_children() [167](vscode-notebook-cell:?execution_count=43&line=167) #값이 들어있다면! [168](vscode-notebook-cell:?execution_count=43&line=168) if results: Cell In[43], [line 87](vscode-notebook-cell:?execution_count=43&line=87) [83](vscode-notebook-cell:?execution_count=43&line=83) for child in child_elements: [86](vscode-notebook-cell:?execution_count=43&line=86) expand_all_categories() ---> [87](vscode-notebook-cell:?execution_count=43&line=87) child.click() [88](vscode-notebook-cell:?execution_count=43&line=88) sleep(2) # 페이지 업데이트 대기 [89](vscode-notebook-cell:?execution_count=43&line=89) # 다시 "child" 항목을 로드하기 위해 스크롤 할 수도 있습니다 File c:\Users\gnbup\.conda\envs\condatest\lib\site-packages\selenium\webdriver\remote\webelement.py:94, in WebElement.click(self) [92](file:///C:/Users/gnbup/.conda/envs/condatest/lib/site-packages/selenium/webdriver/remote/webelement.py:92) def click(self) -> None: [93](file:///C:/Users/gnbup/.conda/envs/condatest/lib/site-packages/selenium/webdriver/remote/webelement.py:93) """Clicks the element.""" ---> [94](file:///C:/Users/gnbup/.conda/envs/condatest/lib/site-packages/selenium/webdriver/remote/webelement.py:94) self._execute(Command.CLICK_ELEMENT) File c:\Users\gnbup\.conda\envs\condatest\lib\site-packages\selenium\webdriver\remote\webelement.py:395, in WebElement._execute(self, command, params) [393](file:///C:/Users/gnbup/.conda/envs/condatest/lib/site-packages/selenium/webdriver/remote/webelement.py:393) params = {} [394](file:///C:/Users/gnbup/.conda/envs/condatest/lib/site-packages/selenium/webdriver/remote/webelement.py:394) params["id"] = self._id --> [395](file:///C:/Users/gnbup/.conda/envs/condatest/lib/site-packages/selenium/webdriver/remote/webelement.py:395) return self._parent.execute(command, params)
...
(No symbol) [0x00007FF7678639A2] (No symbol) [0x00007FF76785A3FF] BaseThreadInitThunk [0x00007FFA66B2257D+29] RtlUserThreadStart [0x00007FFA67F2AF28+40]
Output is truncated. View as a [scrollable element](command:cellOutput.enableScrolling?ce4be2fa-00fc-41b5-832f-2e06b4f7fd1a) or open in a [text editor](command:workbench.action.openLargeOutput?ce4be2fa-00fc-41b5-832f-2e06b4f7fd1a). Adjust cell output [settings](command:workbench.action.openSettings?%5B%22%40tag%3AnotebookOutputLayout%22%5D)...
현제 학과: 기초교양 현제 학과: 핵심1영역 현제 학과: 핵심2영역 현제 학과: 핵심3영역 현제 학과: 핵심4영역 현제 학과: 핵심4-1영역(이공계핵심기초) 현제 학과: 일반교양 현제 학과: 교직 현제 학과: 자유선택 현제 학과: 컴퓨터소프트웨어특성화대학 현제 학과: 컴퓨터정보공학과 현제 학과: 인공지능융합학과 현제 학과: 임베디드소프트웨어학과 현제 학과: 소프트웨어학과 현제 학과: IT융합통신공학과 현제 학과: 생명과학과 현제 학과: 생물학과 현제 학과: 해양수산공공인재학과 현제 학과: 해양생명과학과 현제 학과: 해양생물자원학과 현제 학과: 수산생명의학과 현제 학과: 식품영양학과 현제 학과: 기관공학과 현제 학과: 식품생명공학과 현제 학과: 경영학부
...
현제 학과: 디지털포렌식전공 현제 학과: KCU 현제 학과: OCU 성공!!
Output is truncated. View as a [scrollable element](command:cellOutput.enableScrolling?ea7919c6-b7c9-40ff-a788-f0817576fd15) or open in a [text editor](command:workbench.action.openLargeOutput?ea7919c6-b7c9-40ff-a788-f0817576fd15). Adjust cell output [settings](command:workbench.action.openSettings?%5B%22%40tag%3AnotebookOutputLayout%22%5D)...
학과 이름: 기초교양 학과 이름: 핵심1영역 학과 이름: 핵심2영역 학과 이름: 핵심3영역 학과 이름: 핵심4영역 학과 이름: 핵심4-1영역(이공계핵심기초) 학과 이름: 일반교양 학과 이름: 교직 학과 이름: 자유선택 학과 이름: 컴퓨터소프트웨어특성화대학 학과 이름: 컴퓨터정보공학과 학과 이름: 인공지능융합학과 학과 이름: 임베디드소프트웨어학과 학과 이름: 소프트웨어학과 학과 이름: IT융합통신공학과 학과 이름: 생명과학과 학과 이름: 생물학과 학과 이름: 해양수산공공인재학과 학과 이름: 해양생명과학과 학과 이름: 해양생물자원학과 학과 이름: 수산생명의학과 학과 이름: 식품영양학과 학과 이름: 기관공학과 학과 이름: 식품생명공학과 학과 이름: 경영학부
...
학과 이름: 빅데이터공학전공 학과 이름: 디지털포렌식전공 학과 이름: KCU 학과 이름: OCU
Output is truncated. View as a [scrollable element](command:cellOutput.enableScrolling?108f7c4e-a9b2-4342-943a-e6e848f5d749) or open in a [text editor](command:workbench.action.openLargeOutput?108f7c4e-a9b2-4342-943a-e6e848f5d749). Adjust cell output [settings](command:workbench.action.openSettings?%5B%22%40tag%3AnotebookOutputLayout%22%5D)...
--------------------------------------------------------------------------- ModuleNotFoundError Traceback (most recent call last) ~\AppData\Local\Temp\ipykernel_14420\1371954404.py in <module> ----> 1 from seleniumwire import webdriver 2 from selenium.webdriver.common.by import By 3 from selenium.common import exceptions 4 from getpass import getpass 5 import requests ModuleNotFoundError: No module named 'seleniumwire'
# -*- coding:utf-8 -*-
from selenium import webdriver
from selenium.webdriver.common.by import By
from bs4 import BeautifulSoup
from time import sleep
from openpyxl import Workbook
# 웹 드라이버 설정
driver = webdriver.Chrome()
# 웹 페이지 열기
driver.get('https://everytime.kr/timetable')
driver.implicitly_wait(5)
# 로그인
driver.find_element(By.NAME, 'id').send_keys('gnbupi')
driver.find_element(By.NAME, 'password').send_keys('rlatkddn1212')
sleep(2)
driver.find_element(By.XPATH, '//input[@type="submit" and @value="에브리타임 로그인"]').click()
# 수업 목록에서 검색 클릭
driver.find_element(By.XPATH, '//li[@class="button search"]').click()
# 팝업창 닫기
sleep(2)
driver.find_element(By.CSS_SELECTOR, 'span.key').click()
sleep(1)
# 모든 카테고리 확장
def expand_all_categories():
while True:
parent_elements = driver.find_elements(By.CSS_SELECTOR, 'li.parent')
expanded_any = False
for parent in parent_elements:
if 'unfolded' not in parent.get_attribute('class'):
parent.click()
sleep(1)
expanded_any = True
if not expanded_any:
break
# 모든 <li class="child"> 요소 클릭
def click_all_children():
child_elements = driver.find_elements(By.CSS_SELECTOR, 'li.child')
for i in range(len(child_elements)):
# expand_all_categories 함수를 호출하여 페이지를 업데이트하기 전에
# 매번 child_elements 리스트를 새로 가져옵니다.
expand_all_categories()
child_elements = driver.find_elements(By.CSS_SELECTOR, 'li.child')
child = child_elements[i]
try:
# <a> 태그가 있는 경우
department_name = child.find_element(By.CSS_SELECTOR, 'a').text
except:
# <a> 태그가 없는 경우, 직접 <li> 요소의 텍스트 사용
department_name = child.text
print(f"학과 이름: {department_name}")
click_all_children()
driver.quit()
--------------------------------------------------------------------------- KeyboardInterrupt Traceback (most recent call last) Cell In[5], [line 23](vscode-notebook-cell:?execution_count=5&line=23) [21](vscode-notebook-cell:?execution_count=5&line=21) break [22](vscode-notebook-cell:?execution_count=5&line=22) except: ---> [23](vscode-notebook-cell:?execution_count=5&line=23) continue [24](vscode-notebook-cell:?execution_count=5&line=24) timetable_all = pd.DataFrame() [25](vscode-notebook-cell:?execution_count=5&line=25) timetable_all KeyboardInterrupt:
--------------------------------------------------------------------------- ElementNotInteractableException Traceback (most recent call last) Cell In[43], [line 156](vscode-notebook-cell:?execution_count=43&line=156) [147](vscode-notebook-cell:?execution_count=43&line=147) result.append(tds[12].text) #비고 [150](vscode-notebook-cell:?execution_count=43&line=150) results.append(result) --> [156](vscode-notebook-cell:?execution_count=43&line=156) click_all_children() [167](vscode-notebook-cell:?execution_count=43&line=167) #값이 들어있다면! [168](vscode-notebook-cell:?execution_count=43&line=168) if results: Cell In[43], [line 87](vscode-notebook-cell:?execution_count=43&line=87) [83](vscode-notebook-cell:?execution_count=43&line=83) for child in child_elements: [86](vscode-notebook-cell:?execution_count=43&line=86) expand_all_categories() ---> [87](vscode-notebook-cell:?execution_count=43&line=87) child.click() [88](vscode-notebook-cell:?execution_count=43&line=88) sleep(2) # 페이지 업데이트 대기 [89](vscode-notebook-cell:?execution_count=43&line=89) # 다시 "child" 항목을 로드하기 위해 스크롤 할 수도 있습니다 File c:\Users\gnbup\.conda\envs\condatest\lib\site-packages\selenium\webdriver\remote\webelement.py:94, in WebElement.click(self) [92](file:///C:/Users/gnbup/.conda/envs/condatest/lib/site-packages/selenium/webdriver/remote/webelement.py:92) def click(self) -> None: [93](file:///C:/Users/gnbup/.conda/envs/condatest/lib/site-packages/selenium/webdriver/remote/webelement.py:93) """Clicks the element.""" ---> [94](file:///C:/Users/gnbup/.conda/envs/condatest/lib/site-packages/selenium/webdriver/remote/webelement.py:94) self._execute(Command.CLICK_ELEMENT) File c:\Users\gnbup\.conda\envs\condatest\lib\site-packages\selenium\webdriver\remote\webelement.py:395, in WebElement._execute(self, command, params) [393](file:///C:/Users/gnbup/.conda/envs/condatest/lib/site-packages/selenium/webdriver/remote/webelement.py:393) params = {} [394](file:///C:/Users/gnbup/.conda/envs/condatest/lib/site-packages/selenium/webdriver/remote/webelement.py:394) params["id"] = self._id --> [395](file:///C:/Users/gnbup/.conda/envs/condatest/lib/site-packages/selenium/webdriver/remote/webelement.py:395) return self._parent.execute(command, params)
...
(No symbol) [0x00007FF7678639A2] (No symbol) [0x00007FF76785A3FF] BaseThreadInitThunk [0x00007FFA66B2257D+29] RtlUserThreadStart [0x00007FFA67F2AF28+40]
Output is truncated. View as a [scrollable element](command:cellOutput.enableScrolling?ce4be2fa-00fc-41b5-832f-2e06b4f7fd1a) or open in a [text editor](command:workbench.action.openLargeOutput?ce4be2fa-00fc-41b5-832f-2e06b4f7fd1a). Adjust cell output [settings](command:workbench.action.openSettings?%5B%22%40tag%3AnotebookOutputLayout%22%5D)...
현제 학과: 기초교양 현제 학과: 핵심1영역 현제 학과: 핵심2영역 현제 학과: 핵심3영역 현제 학과: 핵심4영역 현제 학과: 핵심4-1영역(이공계핵심기초) 현제 학과: 일반교양 현제 학과: 교직 현제 학과: 자유선택 현제 학과: 컴퓨터소프트웨어특성화대학 현제 학과: 컴퓨터정보공학과 현제 학과: 인공지능융합학과 현제 학과: 임베디드소프트웨어학과 현제 학과: 소프트웨어학과 현제 학과: IT융합통신공학과 현제 학과: 생명과학과 현제 학과: 생물학과 현제 학과: 해양수산공공인재학과 현제 학과: 해양생명과학과 현제 학과: 해양생물자원학과 현제 학과: 수산생명의학과 현제 학과: 식품영양학과 현제 학과: 기관공학과 현제 학과: 식품생명공학과 현제 학과: 경영학부
...
현제 학과: 디지털포렌식전공 현제 학과: KCU 현제 학과: OCU 성공!!
Output is truncated. View as a [scrollable element](command:cellOutput.enableScrolling?ea7919c6-b7c9-40ff-a788-f0817576fd15) or open in a [text editor](command:workbench.action.openLargeOutput?ea7919c6-b7c9-40ff-a788-f0817576fd15). Adjust cell output [settings](command:workbench.action.openSettings?%5B%22%40tag%3AnotebookOutputLayout%22%5D)...
학과 이름: 기초교양 학과 이름: 핵심1영역 학과 이름: 핵심2영역 학과 이름: 핵심3영역 학과 이름: 핵심4영역 학과 이름: 핵심4-1영역(이공계핵심기초) 학과 이름: 일반교양 학과 이름: 교직 학과 이름: 자유선택 학과 이름: 컴퓨터소프트웨어특성화대학 학과 이름: 컴퓨터정보공학과 학과 이름: 인공지능융합학과 학과 이름: 임베디드소프트웨어학과 학과 이름: 소프트웨어학과 학과 이름: IT융합통신공학과 학과 이름: 생명과학과 학과 이름: 생물학과 학과 이름: 해양수산공공인재학과 학과 이름: 해양생명과학과 학과 이름: 해양생물자원학과 학과 이름: 수산생명의학과 학과 이름: 식품영양학과 학과 이름: 기관공학과 학과 이름: 식품생명공학과 학과 이름: 경영학부
...
학과 이름: 빅데이터공학전공 학과 이름: 디지털포렌식전공 학과 이름: KCU 학과 이름: OCU
Output is truncated. View as a [scrollable element](command:cellOutput.enableScrolling?108f7c4e-a9b2-4342-943a-e6e848f5d749) or open in a [text editor](command:workbench.action.openLargeOutput?108f7c4e-a9b2-4342-943a-e6e848f5d749). Adjust cell output [settings](command:workbench.action.openSettings?%5B%22%40tag%3AnotebookOutputLayout%22%5D)...
--------------------------------------------------------------------------- ModuleNotFoundError Traceback (most recent call last) ~\AppData\Local\Temp\ipykernel_14420\1371954404.py in <module> ----> 1 from seleniumwire import webdriver 2 from selenium.webdriver.common.by import By 3 from selenium.common import exceptions 4 from getpass import getpass 5 import requests ModuleNotFoundError: No module named 'seleniumwire'
from seleniumwire import webdriver
from selenium.webdriver.common.by import By
from selenium.common import exceptions
from getpass import getpass
import requests
import os
import time
DEST_PATH = r'c:\src\inflearn'
page_url = 'https://www.inflearn.com/'
os_name_inhibit = ['\\', '/', ':', '*', '?', '"', '<', '>', '|']
def clear_line():
print(f'{" ":>100}', end='\r')
# 경로나 파일 명에서 쓸 수 없는 문자들을 삭제하기
def trim_path(name: str):
for inhibit in os_name_inhibit:
name = name.replace(inhibit, '')
return name
def make_dest_path(dest):
pass
class VideoCrawler:
def __init__(self):
self._driver = webdriver.Chrome()
def login(self):
login_id = input('아이디를 입력하세요 : ')
pw = getpass('비밀번호를 입력하세요 : ')
print('로그인 중입니다... 잠시만 기다려주세요', end='\r')
self._driver.get(page_url)
self._driver.find_elements(By.CLASS_NAME, "signin")[1].click()
# id 입력
id_input = self._driver.find_element(By.CLASS_NAME, 'form__input--email')
id_input.send_keys(login_id)
# pwd 입력
pw_input = self._driver.find_element(By.CLASS_NAME, "e-sign-in-input")
pw_input.send_keys(pw)
time.sleep(1)
# 로그인 버튼 클릭
submit_btn = self._driver.find_element(By.CLASS_NAME, 'e-sign-in')
submit_btn.click()
clear_line()
print('로그인되었습니다.')
time.sleep(1)
self._driver.get(page_url + 'my-courses')
def get_video_from_current_page(self):
return self.get_video_from_url(self._driver.current_url)
def get_videos_from_current_lecture(self):
return self.get_all_video_from_lecture(self._driver.current_url)
# start, end는 시작과 끝 지점의 인덱스
def get_all_video_from_lecture(self, url, start=0, end=4321):
if self._driver.current_url != url:
self._driver.get(url)
try:
unit_urls = [unit.get_attribute('href') for unit in
self._driver.find_elements('xpath', "//a[@class='unit_item']")]
except exceptions.NoSuchElementException:
print('강의 메인화면으로 이동해주셔야 다운로드가 가능합니다.')
return None
if start > end:
raise ValueError('start value never greater than end')
if end >= len(unit_urls):
end = len(unit_urls) - 1
size = end - start + 1
for idx, unit_url in enumerate(unit_urls):
if start > idx or idx > end:
continue
print(f'전체 강의 다운로드 {size} 중 {idx + 1}...')
self.get_video_from_url(unit_url)
print('강좌 다운로드가 모두 완료되었습니다.')
def get_video_from_url(self, url):
# requests 목록 초기화
del self._driver.requests
if self._driver.current_url != url:
print('connecting to url...', url)
self._driver.get(url)
try:
self._driver.find_element(By.TAG_NAME, 'video')
except exceptions.NoSuchElementException:
print('동영상이 없는 페이지입니다.')
return None
print('영상 대기 중...', end='\r')
elapsed = 0
while True:
vid_js = self._driver.find_element(By.TAG_NAME, 'video-js')
if 'vjs-playing' in vid_js.get_attribute('class'):
break
time.sleep(0.5)
elapsed += 0.5
if elapsed > 10:
try:
self._driver.find_element(By.XPATH, "//button[contains(@class, 'vjs-paused')]").click()
except Exception as e:
print(e)
if elapsed > 30:
print('대기 시간이 너무 오래 걸립니다...')
return None
print('영상 로드 완료', end='\r')
# 만약 영상이 재생 중이라면 멈추게 하기.
try:
self._driver.find_element(By.XPATH, "//button[contains(@class, 'vjs-playing')]").click()
except exceptions.NoSuchElementException:
pass
# 이거는 제외하고 받아오기
title_except = ['목차', '커뮤니티 게시판', '노트']
# ['현재 강의 제목', '전체 강의 제목', ...[목차 순서대로]]
titles = [elem.text for elem in self._driver.find_elements(By.CLASS_NAME, 'title')
if elem.text not in title_except]
# 코스 제목. titles 활용 시 안 나오는 오류가 있어서 선택자로 뽑기
course_title = self._driver.find_element(By.CSS_SELECTOR, ".is-current .title").text
course_index = titles[2:].index(course_title) + 1
course_title = trim_path(course_title)
course_filename = f'{course_index} - {course_title}.mp4'
# 강의 제목
lecture_title = titles[1]
lecture_title = trim_path(lecture_title)
print(f'[{lecture_title} - {course_title}] 강좌를 다운로드합니다.')
# 파일이 이미 존재한다면 기본적으로 새로 생성하지 않는다.
if os.path.isfile(os.path.join(DEST_PATH, lecture_title, course_filename)):
print(os.path.join(DEST_PATH, lecture_title, course_filename))
print('이미 존재하는 강의입니다. 다운로드하지 않습니다.')
return None
headers = {}
root_url = None
meta_info_url = None
for request in self._driver.requests:
if "https://vod.inflearn.com" in request.url and '.m3u8' in request.url:
root_url = request.url[:request.url.rfind('/')] + '/'
headers.update(request.headers)
resp = requests.get(url=request.url, headers=headers)
lines = [line for line in resp.text.strip().split('\n') if '#' not in line]
meta_info_url = lines[-1]
break
if root_url is None:
print('root url을 찾을 수 없습니다.')
return None
resp = requests.get(url=(root_url + meta_info_url), headers=headers)
if resp.status_code != 200:
print(resp.text)
return None
# get source url list
sources = [src for src in resp.text.strip().split('\n') if '#' not in src]
videos = []
for idx, src in enumerate(sources):
print(f'영상 다운로드 중... ({idx / len(sources) * 100:<4.1f}%)', end='\r')
resp = requests.get(url=(root_url + src), headers=headers)
if resp.status_code == 200:
videos.append(resp.content)
print('영상 다운로드 완료. 파일로 다운로드합니다.')
# 다운로드 받을 장소.
src_path = os.path.join(DEST_PATH, lecture_title)
if not os.path.isdir(src_path):
os.mkdir(src_path)
with open(os.path.join(src_path, course_filename), 'wb') as f:
for idx, vid in enumerate(videos):
print(f'파일 합치는 중... ({idx / len(videos) * 100:<4.1f}%)', end='\r')
f.write(vid)
print('다운로드 완료.', lecture_title, '-', course_title)
videos.clear()
if __name__ == '__main__':
vc = VideoCrawler()
vc.login()
while True:
userinput = input('현재 강의에서 모두 다운로드 받으려면 y 입력. 나가려면 out 입력. ')
if userinput.lower() == 'y':
vc.get_videos_from_current_lecture()
elif userinput.lower() == 'out':
break
--------------------------------------------------------------------------- KeyboardInterrupt Traceback (most recent call last) Cell In[5], [line 23](vscode-notebook-cell:?execution_count=5&line=23) [21](vscode-notebook-cell:?execution_count=5&line=21) break [22](vscode-notebook-cell:?execution_count=5&line=22) except: ---> [23](vscode-notebook-cell:?execution_count=5&line=23) continue [24](vscode-notebook-cell:?execution_count=5&line=24) timetable_all = pd.DataFrame() [25](vscode-notebook-cell:?execution_count=5&line=25) timetable_all KeyboardInterrupt:
--------------------------------------------------------------------------- ElementNotInteractableException Traceback (most recent call last) Cell In[43], [line 156](vscode-notebook-cell:?execution_count=43&line=156) [147](vscode-notebook-cell:?execution_count=43&line=147) result.append(tds[12].text) #비고 [150](vscode-notebook-cell:?execution_count=43&line=150) results.append(result) --> [156](vscode-notebook-cell:?execution_count=43&line=156) click_all_children() [167](vscode-notebook-cell:?execution_count=43&line=167) #값이 들어있다면! [168](vscode-notebook-cell:?execution_count=43&line=168) if results: Cell In[43], [line 87](vscode-notebook-cell:?execution_count=43&line=87) [83](vscode-notebook-cell:?execution_count=43&line=83) for child in child_elements: [86](vscode-notebook-cell:?execution_count=43&line=86) expand_all_categories() ---> [87](vscode-notebook-cell:?execution_count=43&line=87) child.click() [88](vscode-notebook-cell:?execution_count=43&line=88) sleep(2) # 페이지 업데이트 대기 [89](vscode-notebook-cell:?execution_count=43&line=89) # 다시 "child" 항목을 로드하기 위해 스크롤 할 수도 있습니다 File c:\Users\gnbup\.conda\envs\condatest\lib\site-packages\selenium\webdriver\remote\webelement.py:94, in WebElement.click(self) [92](file:///C:/Users/gnbup/.conda/envs/condatest/lib/site-packages/selenium/webdriver/remote/webelement.py:92) def click(self) -> None: [93](file:///C:/Users/gnbup/.conda/envs/condatest/lib/site-packages/selenium/webdriver/remote/webelement.py:93) """Clicks the element.""" ---> [94](file:///C:/Users/gnbup/.conda/envs/condatest/lib/site-packages/selenium/webdriver/remote/webelement.py:94) self._execute(Command.CLICK_ELEMENT) File c:\Users\gnbup\.conda\envs\condatest\lib\site-packages\selenium\webdriver\remote\webelement.py:395, in WebElement._execute(self, command, params) [393](file:///C:/Users/gnbup/.conda/envs/condatest/lib/site-packages/selenium/webdriver/remote/webelement.py:393) params = {} [394](file:///C:/Users/gnbup/.conda/envs/condatest/lib/site-packages/selenium/webdriver/remote/webelement.py:394) params["id"] = self._id --> [395](file:///C:/Users/gnbup/.conda/envs/condatest/lib/site-packages/selenium/webdriver/remote/webelement.py:395) return self._parent.execute(command, params)
...
(No symbol) [0x00007FF7678639A2] (No symbol) [0x00007FF76785A3FF] BaseThreadInitThunk [0x00007FFA66B2257D+29] RtlUserThreadStart [0x00007FFA67F2AF28+40]
Output is truncated. View as a [scrollable element](command:cellOutput.enableScrolling?ce4be2fa-00fc-41b5-832f-2e06b4f7fd1a) or open in a [text editor](command:workbench.action.openLargeOutput?ce4be2fa-00fc-41b5-832f-2e06b4f7fd1a). Adjust cell output [settings](command:workbench.action.openSettings?%5B%22%40tag%3AnotebookOutputLayout%22%5D)...
현제 학과: 기초교양 현제 학과: 핵심1영역 현제 학과: 핵심2영역 현제 학과: 핵심3영역 현제 학과: 핵심4영역 현제 학과: 핵심4-1영역(이공계핵심기초) 현제 학과: 일반교양 현제 학과: 교직 현제 학과: 자유선택 현제 학과: 컴퓨터소프트웨어특성화대학 현제 학과: 컴퓨터정보공학과 현제 학과: 인공지능융합학과 현제 학과: 임베디드소프트웨어학과 현제 학과: 소프트웨어학과 현제 학과: IT융합통신공학과 현제 학과: 생명과학과 현제 학과: 생물학과 현제 학과: 해양수산공공인재학과 현제 학과: 해양생명과학과 현제 학과: 해양생물자원학과 현제 학과: 수산생명의학과 현제 학과: 식품영양학과 현제 학과: 기관공학과 현제 학과: 식품생명공학과 현제 학과: 경영학부
...
현제 학과: 디지털포렌식전공 현제 학과: KCU 현제 학과: OCU 성공!!
Output is truncated. View as a [scrollable element](command:cellOutput.enableScrolling?ea7919c6-b7c9-40ff-a788-f0817576fd15) or open in a [text editor](command:workbench.action.openLargeOutput?ea7919c6-b7c9-40ff-a788-f0817576fd15). Adjust cell output [settings](command:workbench.action.openSettings?%5B%22%40tag%3AnotebookOutputLayout%22%5D)...
학과 이름: 기초교양 학과 이름: 핵심1영역 학과 이름: 핵심2영역 학과 이름: 핵심3영역 학과 이름: 핵심4영역 학과 이름: 핵심4-1영역(이공계핵심기초) 학과 이름: 일반교양 학과 이름: 교직 학과 이름: 자유선택 학과 이름: 컴퓨터소프트웨어특성화대학 학과 이름: 컴퓨터정보공학과 학과 이름: 인공지능융합학과 학과 이름: 임베디드소프트웨어학과 학과 이름: 소프트웨어학과 학과 이름: IT융합통신공학과 학과 이름: 생명과학과 학과 이름: 생물학과 학과 이름: 해양수산공공인재학과 학과 이름: 해양생명과학과 학과 이름: 해양생물자원학과 학과 이름: 수산생명의학과 학과 이름: 식품영양학과 학과 이름: 기관공학과 학과 이름: 식품생명공학과 학과 이름: 경영학부
...
학과 이름: 빅데이터공학전공 학과 이름: 디지털포렌식전공 학과 이름: KCU 학과 이름: OCU
Output is truncated. View as a [scrollable element](command:cellOutput.enableScrolling?108f7c4e-a9b2-4342-943a-e6e848f5d749) or open in a [text editor](command:workbench.action.openLargeOutput?108f7c4e-a9b2-4342-943a-e6e848f5d749). Adjust cell output [settings](command:workbench.action.openSettings?%5B%22%40tag%3AnotebookOutputLayout%22%5D)...
--------------------------------------------------------------------------- ModuleNotFoundError Traceback (most recent call last) ~\AppData\Local\Temp\ipykernel_14420\1371954404.py in <module> ----> 1 from seleniumwire import webdriver 2 from selenium.webdriver.common.by import By 3 from selenium.common import exceptions 4 from getpass import getpass 5 import requests ModuleNotFoundError: No module named 'seleniumwire'