All pastes #428979 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-04-07 23:32 UTC
rendered paste body
on *:sockread:price.*:{ 
  if ($sockerr) { $($+(%,price.display.,%PRID),2) ERROR: $sockname $+ . Code: $Sockerr Please contact Ktravaglini. | halt }
  else { var %templine | sockread %templine
    if ($regex(%templine,/<td class="tablebottom">(.*)</td>/)) || ($regex(%templine,/<td class='tablebottom'>(.*)</td>)) || ($regex(%templine,/<td class="tablebottom" width="20">(.*)</td>)) {
      if ($regml(1) != &nbsp;) && ($regml(1) != Zybez is screwing up our parser because we don't credit them. ^_^) && (<a href="/priceguide.php?report= !isin $regml(1)) && ($regml(1) != http://www.Zybez.net) && ($regml(1) != <img src="/img/member.gif" alt="[M]"/>) { inc $+(%,price.line.,%PRID)
        if ($($+(%,price.line.,%PRID),2) == 1) || ($($+(%,price.line.,%PRID),2) == 4) || ($($+(%,price.line.,%PRID),2) == 7) || ($($+(%,price.line.,%PRID),2) == 10) || ($($+(%,price.line.,%PRID),2) == 13) { set $+(%,price.item.,%itemcount,.,%PRID) $regml(1) | inc %itemcount }
        elseif ($($+(%,price.line.,%PRID),2) == 2) || ($($+(%,price.line.,%PRID),2) == 5) || ($($+(%,price.line.,%PRID),2) == 8) || ($($+(%,price.line.,%PRID),2) == 11) || ($($+(%,price.line.,%PRID),2) == 14) { set $+(%,price.price.,%pricecount,.,%PRID) $regml(1) | inc %pricecount }
        elseif ($($+(%,price.line.,%PRID),2) == 3) || ($($+(%,price.line.,%PRID),2) == 6) || ($($+(%,price.line.,%PRID),2) == 9) || ($($+(%,price.line.,%PRID),2) == 12) || ($($+(%,price.line.,%PRID),2) == 15) { set $+(%,price.cata.,%catacount,.,%PRID) $htmlfree($regml(1)) | inc %catacount | set $+(%,price.link.,%linkcount,.,%PRID) Http://www.zybez.net $+ $remove($regml(1),<a href=",">,</a) | inc %linkcount }        
        while (%discount < %linkcount) { set $+(%,price.message.,%PRID) $($+(%,price.message.,%PRID),2) $c1(Item:) $c2($($+(%,price.item.,%discount,.,%PRID),2)) $c1(Price:) $c2($($+(%,price.price.,%discount,.,%PRID),2)) $c1(Category:) $c2($($+(%,price.cata.,%discount,.,%PRID),2)) $c1(Link:) $c2($($+(%,price.link.,%discount,.,%PRID),2)) | inc %discount }
      }
    }
  }
}