'Gets the download information for 1337x result'

def url_rewrite(self, task, entry):

    url = entry[u'url']
    log.info((u'1337x    rewriting    download    url:    %s' % url))
    try:
        page = task.requests.get(url)
        log.debug(u'requesting:    %s', page.url)
    except RequestException as e:
        log.error(u'1337x    request    failed:    %s', e)
        raise UrlRewritingError(u'1337x    request    failed:    %s', e)
    soup = get_soup(page.content)
    magnet_url = str(soup.find(u'a', id=u'magnetdl').get(u'href')).lower()
    torrent_url = str(soup.find(u'a', id=u'torrentdl').get(u'href')).lower()
    entry[u'url'] = torrent_url
    entry.setdefault(u'urls', []).append(torrent_url)
    entry[u'urls'].append(magnet_url)
