Replaced grab by pyquery and fixed the script.