Parse thread ID from id element rather than link

Link may be of the form /showthread.php?t=<thread_id> rather than the usual /<thread_title>-t<thread_id>