I believe I have sorted out the issue, the socket timeout was too low. This led me on a chase to figure out how to most optimally and quickly obtain the data, and I believe I am satisfied with the solution.
In my case, I am proxying through nginx to add SSL support. But this should work with a direct connection to Deepbot as well.
Here is my updated class:
http://pastebin.com/3Y2i2Mpx