Skip to content

Instantly share code, notes, and snippets.

Chinseok Lee allieus

Block or report user

Report or block allieus

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View naver_realtime_keywords.py
import requests
from bs4 import BeautifulSoup
def get_realtime_keyword_list():
html = requests.get('https://www.naver.com/').text
soup = BeautifulSoup(html, 'html.parser')
tag_list = soup.select('.PM_CL_realtimeKeyword_rolling .ah_item .ah_k')
keyword_list = [tag.text for tag in tag_list]
return keyword_list
View pnu_20190604_setup.md
View README.md

pip의 경우

pip install 시, SSL 인증서 오류에 대한 대처

아래 코드로 pip 폴더를 생성하고

echo %APPDATA%\pip
@allieus
allieus / README.md
Last active May 6, 2019
인스타그램 인증 예시 by Ask Company
View README.md
View matplotlib_sample01.py
%matplotlib inline
from matplotlib import pyplot as plt
import numpy as np
x = np.arange(0, 10, 0.01)
plt.plot(x, np.cos(x))
plt.plot(x, np.sin(x))
View 네이버_실검_크롤링.py
import requests
from bs4 import BeautifulSoup
res = requests.get("http://naver.com")
html = res.text
soup = BeautifulSoup(html, 'html.parser')
tag_list = soup.select('.PM_CL_realtimeKeyword_rolling .ah_k')
for rank, tag in enumerate(tag_list, 1): # 항상 하위 block 전에 콤마(:)를 씁니다.
label = tag.text
View share_banner.html
<a href="https://www.askcompany.kr" style="display: block;">
<img src="https://askcompanyjpe.blob.core.windows.net/static/askcompany_vod_shared_banner.jpg" style="border: 0; width: 250px;" />
</a>
@allieus
allieus / README.md
Last active Dec 3, 2018
교보문고 검색결과 크롤링 by Ask Company
View README.md

keyword_encode 로직은 교보문고 페이지의 javascript 로직을 그대로 흉내내어 만들었습니다.

실행결과

>>> search('파이썬')

Do it! 점프 투 파이썬
http://www.kyobobook.co.kr/product/detailViewKor.laf?ejkGb=KOR&mallGb=KOR&barcode=9788997390915&orderClick=LAG&Kc=
View README.md
You can’t perform that action at this time.