일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- gas
- Apache
- Excel
- string
- google apps script
- hive
- PANDAS
- GIT
- matplotlib
- PySpark
- django
- Java
- array
- numpy
- SQL
- Python
- Kotlin
- Mac
- Google Excel
- Google Spreadsheet
- Redshift
- PostgreSQL
- Tkinter
- c#
- 파이썬
- math
- list
- dataframe
- Github
- Today
- Total
목록Crawling (2)
달나라 노트
https://cosmosproject.tistory.com/158?category=953474 Python : Web page의 HTML 코드를 가져오기. import requests from bs4 import BeautifulSoup as bs URL = "https://www.naver.com" rq = requests.get(URL) soup = bs(rq.content, 'html.parser') print(soup) 어떤 Web 페이지의 HTML 코드를 가져오기 위해.. cosmosproject.tistory.com 위 링크에서 web page의 HTML 코드를 crawling해오는 내용을 다뤘습니다. https://cosmosproject.tistory.com/159?category=953..
Web 페이지의 HTML코드를 가져온 다음에는 정보를 선택하는 작업이 필요합니다. 가져온 HTML 코드에서 내가 원하는 부분만 추출할 수 있어야 한다는 뜻입니다. import requests from bs4 import BeautifulSoup as bs URL = "https://www.naver.com" rq = requests.get(URL) soup = bs(rq.content, 'html.parser') li_list = soup.find_all('div', class_ = 'sc_timesquare') for li in li_list: ul = li.select('ul > li') for l in ul: print(l.get_text()) - Output 미세좋음 초미세좋음 위 코드를 봐봅시다..