|
|
|
@ -273,14 +273,9 @@ def saveData(savepath,datalist,web_name): #保存文件
|
|
|
|
|
'''---------代码开始的地方---------'''
|
|
|
|
|
|
|
|
|
|
def begin_spider(url, web_name):
|
|
|
|
|
url='https://guilin.baixing.com/ershou/?page='
|
|
|
|
|
web_name='桂林百姓网二手市场'
|
|
|
|
|
savepath = os.getcwd() #获取当前路径作为保存路径
|
|
|
|
|
datalist = getData(url)
|
|
|
|
|
saveData(savepath,datalist,web_name)
|
|
|
|
|
|
|
|
|
|
def main():
|
|
|
|
|
url='https://guilin.baixing.com/ershou/?page='
|
|
|
|
|
web_name='桂林百姓网二手市场'
|
|
|
|
|
begin_spider(url, web_name)
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
|
main()
|
|
|
|
|