Created
February 27, 2017 20:20
-
-
Save tzkmx/8dba379773d8362a0888a799057b7f49 to your computer and use it in GitHub Desktop.
Windows batch file to validate list of URLs with AMP errors
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO OFF | |
FOR /F "usebackq tokens=1 delims=," %%A IN (`grep -v "URL" elsemanario-com__etiqueta_HTML_prohibida.csv`) DO ( | |
FOR /F "usebackq" %%B IN (`amphtml-validator --format=json %%A`) DO ( | |
echo %%B|findstr /C:"PASS" >NUL 2>&1 | |
IF not errorlevel 1 ( | |
echo %%A | tee -a valid_urls.txt | |
) ELSE ( | |
echo %%A | tee -a nonvalid_urls.txt | |
) | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment