Last time we discussed about the difference between crawling and scraping and some examples relating them.
2022.12.06 - [Python] - Python) Crawling and Scraping1
Python) Crawling and Scraping1
Crawling Crawling is a technique that programs regularly travel around the website to extract information. Programs that crawl are called "Crawler" or "Spider." For example, the crawler you use to implement a search engine can be linked to a website. Go ar
www.agilemeadow.com
Here in this post, we will search by utilizing Naver API and the selenium library.
You first have to register your application on the provided website.
https://developers.naver.com/products/service-api/search/search.md
검색 - SERVICE-API
검색 NAVER Developers - 검색 API 소개 웹, 뉴스, 블로그 등 분야별 네이버 검색 결과를 웹 서비스 또는 모바일 앱에서 바로 보여 줄 수 있습니다. 또한 ’OO역맛집’과 같은 지역 검색을 할 수도 있으
developers.naver.com
First, import the urllib.
You need the key that you got issued on the Naver API website.
Save the content in the result variable.
Then, save it in the txt file.
You can also search for news articles. You can set the number of news articles you need with the keyword.
First, import the libraries, and
Crawling
Save the result into xlsx file.
Convert the xlsx file into txt file.
Now, let's use this file to make a word cloud.
Please refer to my previous post if you need some references.
2022.12.10 - [Python] - Python) WordCloud
Move the files saved into the data folder and make a word cloud!
You can also make a graph reflecting the frequency of the words.
Word Cloud
Word cloud with mask
'Python' 카테고리의 다른 글
Python) Crawling and Scraping1 (0) | 2022.12.08 |
---|---|
Python) WordCloud (0) | 2022.12.07 |
Python) Graphs (0) | 2022.12.04 |
Python) Data Analysis - pandas (0) | 2022.12.03 |
Python) functions for data analysis (0) | 2022.11.30 |