再见!在
用python 3*编写了以下代码,其中给出了一系列错误:from html.parser import HTMLParser
import re
from urllib.request import urlopen
import glob
your_hotel_adres="http://www.booking.com/hotel/ua/boutique-hotel-kavalier.ru.html"
your_hotel_сс1=your_hotel_adres[29:31]
your_hotel_pagename=''
i = 30
while i <= len(your_hotel_adres):
i = i + 1
if your_hotel_adres[i:i+5] == ".html":
your_hotel_pagename=your_hotel_adres[32:i-3]
break
your_hotel_comm="http://www.booking.com/reviewlist.ru.html?pagename="+your_hotel_pagename+";cc1="+your_hotel_сс1+";type=total;dist=1;offset=0;rows=1000"
f = urlopen(your_hotel_comm)
它应该下载一个网页并将其写入变量。所以我运行它,得到很多错误:
^{pr2}$