로딩
요청 처리 중입니다...

[ Python ] 파이썬 날씨정보 xml BeautifulSoup로 파씽하여 SQLite에 날씨정보 저장하기. ( 소스코드 )

 [ Python ] 파이썬 날씨정보 xml BeautifulSoup로 파씽하여 SQLite에 날씨정보 저장하기. ( 소스코드 )

Python [ Python ] 파이썬 날씨정보 xml BeautifulSoup로 파씽하여 SQLite에 날씨정보 저장하기. ( 소스코드 ) 사진찍는 개발자 2018. 2. 22. 12:27 이웃추가 본문 기타 기능 http://www.weather.go.kr/weather/forecast/mid-term-rss3.jsp?stnId=108 기상청의 오늘 전국 날씨 정보를 가져와서 SQLite에 저장하는 예제입니다. from bs4 import BeautifulSoup import requests import sqlite3 url = "http://www.weather.go.kr/weather/forecast/mid-term-rss3.jsp?

stnId=108" data = requests.get(url) xml = data.text # db 생성하기 filepath = "weather01.sqlite" conn = sqlite3.connect(filepath) cur = conn.cu...

# BeautifulSoup # Python # SQLite # xml # 날씨정보 # 소스코드