What could I do to make this quicker? Also is there a way to easily put a check in the code that if $html="" for it to resend the fetch until it gets something but not more than 3 tries?
<strfmt "%U" $q>
<sandr "[\?\#\{\}\+\\]" "\\\1" $ret>
<sandr "xyzzy" $ret $searchurl>
<sandr "ayazzy" $start $ret>
<sandr "aaabbb" $resultsdisplay $ret>
<sandr "aaaccz" $adsdisplay $ret>
<sandr "ppyazzy" $page $ret>
<sandr "ipyxxy" $Ip $ret>
<sandr "uayzzy" $useragent $ret>
<sandr "pyzzy" $safe $ret>
<sandr "crcrcr" $pro $ret>
<sandr "hwxqhw" $lang $ret>
<if $pro neq ""><sandr "hrhrhr" $country $ret></if>
<$liveurls = $ret>
<$acturls = >
<$actimports = >
<$actimports1 = >
<$actimports2 = >
<$acturls = $acturls $liveurls>
<$actimports = $actimports $imports>
<$actimports1 = $actimports1 $imports1>
<$actimports2 = $actimports2 $imports2>
<urlcp timeout 30>
<fmtcp query "%mbH" $q>
<fetch PARALLEL $acturls $actimports $actimports1 $actimports2>
<$html=$ret>
<flush></fetch><flush>
<strfmt "%U" $q>
<sandr "[\?\#\{\}\+\\]" "\\\1" $ret>
<sandr "xyzzy" $ret $searchurl>
<sandr "ayazzy" $start $ret>
<sandr "aaabbb" $resultsdisplay $ret>
<sandr "aaaccz" $adsdisplay $ret>
<sandr "ppyazzy" $page $ret>
<sandr "ipyxxy" $Ip $ret>
<sandr "uayzzy" $useragent $ret>
<sandr "pyzzy" $safe $ret>
<sandr "crcrcr" $pro $ret>
<sandr "hwxqhw" $lang $ret>
<if $pro neq ""><sandr "hrhrhr" $country $ret></if>
<$liveurls = $ret>
<$acturls = >
<$actimports = >
<$actimports1 = >
<$actimports2 = >
<$acturls = $acturls $liveurls>
<$actimports = $actimports $imports>
<$actimports1 = $actimports1 $imports1>
<$actimports2 = $actimports2 $imports2>
<urlcp timeout 30>
<fmtcp query "%mbH" $q>
<fetch PARALLEL $acturls $actimports $actimports1 $actimports2>
<$html=$ret>
<flush></fetch><flush>