Ver Mensaje Individual
  #3 (permalink)  
Antiguo 02/07/2013, 11:25
nitrix
Invitado
 
Mensajes: n/a
Puntos:
Exclamación Respuesta: no se ejecuta el script

... no creo la verdad, te dejo el codigo para que lo analizes a ver.

Código:
#!/usr/bin/python
import urllib2, re
response00 = urllib2.urlopen('http://AQUIVAUNAIPDEIMPRESORA/web/guest/en/websys/status/getUnificationCounter.cgi')
response01 = urllib2.urlopen('http://AQUIVAOTRAIPDEIMPRESORA/web/guest/en/websys/status/getUnificationCounter.cgi')

print '#############################################'
print '#####[ RICOH COUNTERS BY MADELINE]#########'
print '#############################################'
html = response00.read()
for lines in html.split('/tr'):
	if "Total" in lines:
		item1 = re.match( r'(.*)Total(.*) nowrap>(.*)</td>(.*)', lines, re.M|re.I)
		print "[*] - Device Name: RICOH aficio MP 1600"
                print "[*] - Location:    Multiquimica Dominicana"
                print "[*] - Machine ID:  L6806240067"
                print "[*] - TOTAL COUNT: " + item1.group(3)
		print '#############################################'
		break

#print '========================================================================'
html = response01.read()
for lines in html.split('/tr'):
	if "Total" in lines:
		item1 = re.match( r'(.*)Total(.*) nowrap>(.*)</td>(.*)', lines, re.M|re.I)
		print "[*] - Device Name: RICOH aficio MP 1600"
                print "[*] - Location:    Doperco S.A."
                print "[*] - Machine ID:  L6877240014"
                print "[*] - TOTAL COUNT: " + item1.group(3)
		print '#############################################'
		break