Changed script so that web pages parsing doesn't fail because of some invalid encoding