lib/netprint/agent.rb in netprint-0.0.3 vs lib/netprint/agent.rb in netprint-0.0.4
- old
+ new
@@ -49,10 +49,10 @@
def get_code
code = nil
loop do
page = mechanize.get(url.list)
- _, registered_name, status = page.search('//tr[@bgcolor="#CFCFE6"][1]/td')
+ _, registered_name, status = page.search('//tr[@bgcolor="#CFCFE6" or @bgcolor="#ff6666"][1]/td')
if status.text =~ /^[0-9A-Z]{8}+$/
code = status.text
break
elsif status.text == 'エラー'