import re


def raw_text_url_from_paste_html(paste_html):
    """Return raw text URL from a paste page source."""
    url, = re.findall(
        r'<a class="button" href="(http://localhost:\d+/object/[^"]+)">\s+Raw Text',
        paste_html,
    )
    return url