diff --git a/README.md b/README.md index 3f44e00..206faf6 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +# 0.1.1 +- 修正店铺信息 # 0.1.0 - 修复cloudflare验证问题 # 0.0.9 diff --git a/spider/api.py b/spider/api.py index c58ea33..3412902 100644 --- a/spider/api.py +++ b/spider/api.py @@ -66,7 +66,7 @@ def main(): 列顺序:`Name,Address,City` """ api = Api() - csv_path = os.path.join(os.path.dirname(__file__), 'bakeries.csv') + csv_path = os.path.join(os.path.dirname(__file__), 'data.csv') if not os.path.exists(csv_path): logger.error(f'CSV 文件不存在: {csv_path}') return @@ -78,7 +78,7 @@ def main(): if len(row) < 3: logger.warning(f'行列数不足,跳过: {row}') continue - shop_name, street, city = row[0], row[1], row[2] + shop_name, street, city = row[1], row[2], row[0] if ' (city)' in city: city = city.replace(' (city)', '') if 'Quebec' in city: @@ -96,6 +96,6 @@ def main(): # logger.info(shop) # if __name__ == '__main__': -# main2() +# main() api = Api() \ No newline at end of file diff --git a/spider/main.py b/spider/main.py index 2d73b9d..9cbb79a 100644 --- a/spider/main.py +++ b/spider/main.py @@ -122,7 +122,7 @@ class Auto: continue_button.click() logger.debug("点击Continue按钮成功") self.tab.wait(1.5) - bol = self.tab.ele('t:div@text():Loading...', timeout=1) + bol = self.tab.ele('@text():Loading', timeout=1) if bol: logger.debug("Loading...") if bl: