数据来源:https://srh.bankofchina.com/search/whpj/search_cn.jsp
import time
import requests
from urllib.parse import urlencode
import datetime
from datetime import timedelta
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import os
from tqdm import tqdm
#显示所有列
pd.set_option('display.max_columns', None)
#显示所有行
pd.set_option('display.max_rows', None)
pd.set_option('display.width',120)
# 精度要求
# pd.set_option('precision',3)
np.set_printoptions(precision=3)
pd.set_option('display.float_format', lambda x: '%.3f' % x)
url = 'https://srh.bankofchina.com/search/whpj/search_cn.jsp'
headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/