@echo off set url=%* if not defined url ( echo input kuaishou url. echo Usage: %0 "url" exit/b ) wget %* -O kuai.html cat kuai.html|grep -Eio "<video(.*)</video>"|grep -Eio "poster=(.*).jpg">temp.txt sed -i "s/poster="//g" temp.txt sed -i "s/jpg/mp4/g" temp.txt cat temp.txt for /f "delims=" %%i in ('cat temp.txt') do set urlmp4=%%i echo %urlmp4% set outfn=%date%_%time:~0,8%.mp4 set outfn=%outfn::=.% wget %urlmp4% -O "%outfn%" del temp.txt del kuai.html