import os
import requests
from bs4 import BeautifulSoup


base_url = 'https://developer.work.weixin.qq.com'

url = 'https://developer.work.weixin.qq.com/document/path/92455'
html = requests.get(url)
html.encoding = 'utf-8'

soup = BeautifulSoup(html.text, 'lxml')
sidebar = soup.select('.sidebar')[0]
for link in sidebar.find_all('a'):
    download_url = base_url + link['href']
    print(download_url)
    os.system(f"""wget.exe -P ./api_doc -r -p -np -k "{download_url}""")
import os
import requests
from bs4 import BeautifulSoup


base_url = 'https://developer.work.weixin.qq.com'

url = 'https://developer.work.weixin.qq.com/document/path/92455'
html = requests.get(url)
html.encoding = 'utf-8'

soup = BeautifulSoup(html.text, 'lxml')
sidebar = soup.select('.sidebar')[0]
for link in sidebar.find_all('a'):
    download_url = base_url + link['href']
    print(download_url)
    os.system(f"""wget.exe -P ./api_doc -r -p -np -k "{download_url}""")
wget.exe -P ./api_doc -r -p -np -k "{download_url}