py-ms-cognitive
py-ms-cognitive copied to clipboard
deeplink dead?
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