From 5465d9598ef2adec1c4a86d8643baf2b009346a3 Mon Sep 17 00:00:00 2001 From: jiacai_wang Date: Tue, 27 Sep 2022 21:59:33 +0800 Subject: [PATCH] re-arrange proj layout --- .drone.yml | 3 ++- requirements.txt | 3 --- 花山印象/sell_status.py | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) delete mode 100644 requirements.txt diff --git a/.drone.yml b/.drone.yml index d306b2b..dbfe4cd 100644 --- a/.drone.yml +++ b/.drone.yml @@ -5,5 +5,6 @@ steps: image: python:latest commands: - pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple + - cd 花山印象 - pip3 install -r ./requirements.txt - - python3 ./花山印象/sell_status.py + - python3 ./sell_status.py diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 8fd1483..0000000 --- a/requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -lxml==4.8.0 -openpyxl==3.0.10 -requests==2.25.1 diff --git a/花山印象/sell_status.py b/花山印象/sell_status.py index 0444b80..14f302f 100644 --- a/花山印象/sell_status.py +++ b/花山印象/sell_status.py @@ -27,7 +27,7 @@ for idx, url in enumerate(sell_status_url): ws['A1'].value = "数据来源" ws['B1'].value = url - resp = requests.get(url, headers=headers) + resp = requests.get(url, headers=headers, timeout=300) sell_table = etree.HTML(resp.text).xpath('//*[@id="fwxx"]/table')[0] # our table starts at A4 table_col = 1