Fixing boundary cases for web scraping