Extract URL from HAR 1.0

烈酒焚心 提交于 2020-03-13 06:53:51

 main.bat

 1 @echo off
 2 color 0a
 3 title Extract URL from HAR 1.0
 4 
 5 SETLOCAL ENABLEEXTENSIONS
 6 SETLOCAL ENABLEDELAYEDEXPANSION
 7 
 8 pushd "%TEMP%"
 9 
10 set PARAM=%~1
11 set FILE_EXT=.har
12 
13 if "%PARAM%" equ "" (
14     echo Please drag and drop a ^'*%FILE_EXT%' file onto this batch program.
15     goto NORMAL_EXIT
16 )
17 
18 for %%i in ("%PARAM%") do (
19     if /i "%%~xi" neq "%FILE_EXT%" (
20         echo Type of file must be ^'%FILE_EXT%'.
21         goto NORMAL_EXIT
22     )
23     if /i %%~zi equ 0 (
24         echo Error #1
25         goto NORMAL_EXIT
26     )
27 )
28 
29 findstr /c:"""url""" "%PARAM%" > tve_segment_1
30 cd . > tve_segment_2
31 for /f "tokens=1* delims=:" %%i in (tve_segment_1) do (
32     set T_STR=%%j
33     >> tve_segment_2 echo !T_STR:~2,-2!
34 )
35 
36 clip < tve_segment_2
37 del tve_segment_1 tve_segment_2
38 
39 SETLOCAL DISABLEDELAYEDEXPANSION
40 echo Hey! Now you can add batch download from clipboard.
41 
42 :NORMAL_EXIT
43 popd
44 pause
45 exit

 

Firefox --> Ctrl+Shift+E --> Media --> Save All As HAR

 

 

附件1

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!