벌집 기어 오 르 기 여행 정보

971 단어 python
관광지 방문 인원수
# encoding: utf-8
import requests
import json
import re
import csv
from bs4 import BeautifulSoup
#      

lists=[]
dicts={}
ss=0
for i in range(1,20):

    url="http://www.mafengwo.cn/mdd/base/map/getCityList"
    headers={

        "origin":"http://www.mafengwo.cn",
        "referer": "http://www.mafengwo.cn/mdd/map/13295.html",
        "user-agent":"Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.92 Safari/537.36",

    }
    data={
        "mddid": 13295,
        "page": i
    }
    #url = 'https://hotels.ctrip.com/hotel/10201435.html?isFull=F&checkIn=2019-04-08&checkOut=2019-04-09#ctm_ref=hod_sr_lst_dl_n_1_1'
    info={}
    #      ,      
    headers = {'user-agent': 'my-app/0.0.1'}
    res= requests.post(url, headers=headers, data=data)
    shuju=json.loads(res.text)

좋은 웹페이지 즐겨찾기