Just a detail, you can avoid the $read() in the !delurl section with
/write -dw $+ %a badurls.txt