You must have an API that gets you access to these unlinked posts, correct?
while True:
i += 1
if not urlfetch('http://news.ycombinator.com/comments?id=%d' % i):
break
# implementaton of urlfetch() left as an exercise to the reader
You must have an API that gets you access to these unlinked posts, correct?