Bootcamp

[Crawling] - 간단한 크롤링

K_Hyul 2023. 12. 27. 09:50
728x90
https://www.starbucks.co.kr/store/store_map.do?disp=locale
pip install requests 

import requests
import pandas as pd

url = "https://www.starbucks.co.kr/store/getStore.do?r=6DKBI0DUO3"

payload= {"in_biz_cds" : "0",
"in_scodes" : "0",
"ins_lat" : "37.56682",
"ins_lng" : "126.97865",
"search_text" : "",
"p_sido_cd" : "01",
"p_gugun_cd" : "",
"in_distance" : "0",
"in_biz_cd" : "",
"isError" : "true",
"searchType" : "C",
"set_date" : "",
"all_store" : "0",
"T03" : "0",
"T01" : "0",
"T27" : "0",
"T12" : "0",
"T09" : "0",
"T30" : "0",
"T05" : "0",
"T22" : "0",
"T21" : "0",
"T10" : "0",
"T36" : "0",
"T43" : "0",
"T48" : "0",
"Z9999" : "0",
"P10" : "0",
"P50" : "0",
"P20" : "0",
"P60" : "0",
"P30" : "0",
"P70" : "0",
"P40" : "0",
"P80" : "0",
"whcroad_yn" : "0",
"P90" : "0",
"P01" : "0",
"new_bool" : "0",
"iend" : "1000",
"rndCod" : "EMP6WZ23VQ",}


r = requests.post(url, data=payload)
df = pd.DataFrame(r.json()['list'])
df2 = df[df.isnull().sum()[~(df.isnull().sum() > 600)].index].copy()

 

728x90

'Bootcamp' 카테고리의 다른 글

[Kubernetes] 쿠버네티스 마스터 설정하기  (1) 2024.02.01
[Spark] spark 다루기  (0) 2024.01.18
[MySQL] 네트워크, mysql  (1) 2023.12.28
[Linux] Linux & Jupyter Notebook  (1) 2023.12.27
[AI Vision] Mini Project  (0) 2023.11.17