Welcome to the howdoi wiki!
The answers currently come from Stack Overflow, searched using Google site search. Howdoi scrapes and prints the first code block in the top answer, or the full text of the top answer if it contains no code block.
howdoi/howdoi.py is the code that actually does the work.
$ howdoi thanks