check html length before exit fetching loop