fixed pasthtml check
added json check
fixed script returning first value of day for area PSI/PM everytime