pip install mkdocs mkdocs-material
pip install jieba
pip install pyembed-markdown
cd /Users/wuwenjie/mylab/changxue/scratch3-adapter-docs/docs
ack -ho "http:.*.mp4" > /tmp/adapter_video_url_list.txt
取得视频列表保存下来
python3
import subprocess
with open("/tmp/adapter_video_url_list.txt") as png_url_list:
urls_all = png_url_list.readlines()
urls_set = set(urls_all)
print("urls_all:",len(urls_all),"urls_set:",len(urls_set))
for url in urls_set:
cmd = f"wget {url}"
# print(cmd)
subprocess.call(cmd,shell=True)
ack -ho "http://scratch3-files.just4fun.site.+\.mp4" > mp4_list.txt
import subprocess
with open("/tmp/mp4_list.txt") as mp4_url_list:
urls = set(mp4_url_list.readlines()) # 去重
for url in urls:
cmd = f"wget {url} --directory-prefix=docs/video/"
subprocess.call(cmd,shell=True)