Work-in-progress of handling `maximum recursion depth exceeded` errors that
are occasionally thrown by BeautifulSoup.

This hasn't been super well tested, as it has only been an issue on a message
every 100k or so...

In the future I want to switch to Google's Gumbo parser (or something) for
better speed and error handling.
Split the query into windowed parts, since loading all the rows into memory
is slow and usually kills the Python process.