Rewrite download link parsing

The new code allows for filtering out beta releases, which would not
have been possible with the old parsing code.