본문 바로가기
Python

[트립어드바이저] URL 메모장 저장

by 퍼포먼스마케팅코더 2017. 1. 25.
반응형

import time

from selenium import webdriver

import urllib.request

import urllib.parse

from bs4 import BeautifulSoup


#트립어드바이저  URL 메모장 저장

Tripadvisor_first_URL = 'https://www.tripadvisor.co.kr/Attraction_Review-g294197-d553546-Reviews-or'

Tripadvisor_second_URL = '-Myeongdong_Shopping_Street-Seoul.html#REVIEWS'

input_URL = open('C:/Users/eyeden-FF14/Desktop/input_URL.txt', 'w', encoding='utf-8')


result1 = []

for num in range(0, 36) :

      num +=1

      result1.append(num*10)


for page in  result1[0:36] :

      url = Tripadvisor_first_URL+str(page)+Tripadvisor_second_URL

      input_URL.write(str(url) + '\n')

input_URL.close()

      



반응형

댓글