Finally I did it with some trial and error.
We can use timeout option here to reduce the Sockettimeoutexception by changing
doc = Jsoup.connect(link).get();
to
doc = Jsoup.connect(link).timeout(10000).get();
And there is still one other error, thats to remove the Toast message in the onPostExecute as we cannot interact without handler from background task to UI.
That's it.