I'm always surprised by the power and concision of sed! The only problem being able to find the (few) characters that do what I want :-)
aaronsw's html2text is doing a fine job converting html to markdown, but I prefer the underlined format for h1 and h2 titles as it is prettier (imho) when viewing the ascii code, so, here comes sed:
./html2text.py <url> | sed -e '/^# / {s/^# //p;s/./=/g}' -e '/^## / {s/^## //p;s/./-/g}' > url.md