# 잡코리아 크롤링
from urllib.request import urlopen
from bs4 import BeautifulSoup
import openpyxl
def search():
url = f'https://www.jobkorea.co.kr/Search/?stext=it'
src1 = urlopen(url).read()
src2 = BeautifulSoup(src1,'html.parser')
src3 = src2.select('p.etc')
with open('it','a',encoding="utf-8") as f:
for i in src3:
print(i.text)
if __name__ == '__main__':
search()
* 결과물 *
# 모델 시각화
from wordcloud import WordCloud
import matplotlib.pyplot as plt
def word():
text = open('C:/Users/pc346/Desktop/xxxx2.txt',encoding='UTF8').read()
wordcloud = WordCloud(font_path='C:/Users/pc346/Desktop/nanum-gothic/NanumGothic.ttf', background_color='white').generate(text)
wordcloud.to_file('it.png')
plt.figure(figsize=(22,22)) #이미지 사이즈 지정
plt.imshow(wordcloud, interpolation='lanczos') #이미지의 부드럽기 정도
plt.axis('off') #x y 축 숫자 제거
plt.show()
if __name__ == '__main__':
word()
* 결과물 *