Update agscraper.py

Added some exception handling