py-ms-cognitive icon indicating copy to clipboard operation
py-ms-cognitive copied to clipboard

deeplink dead?

Open sciatro opened this issue 7 years ago • 0 comments

It looks to me like WebResult's deeplink might not be working / expects an older version of the API.

Currently it seems to be empty, always. Actually getting deep links (frankly, "real" links vs the Bing redirects) would be helpful. It looks do-able. This split based code is nasty a workable proof of concept:

import urllib import unquote
from urlparse import urlparse

def real_url(api_url):
    q = urlparse(api_url).query
    encoded_url = q.split('&r=', 1)[1].split('&p=', 1)[0]
    return unquote(encoded_url)

^^ py2

sciatro avatar Mar 11 '17 18:03 sciatro