如何通过YQL和Yahoo管道访问密码/ SSL安全内容

时间:2012-03-30 03:02:39

标签: https yql yahoo-pipes http-status-code-401

通过基本的HTTP身份验证来保护内容:您尝试访问该URL,您的浏览器会提示您输入用户,填写提交内容,并且您已获得该资源。通过在普通浏览器中按如下方式发出请求,可以压缩这些步骤:

http://user:password@host.tld/somethingsnazzy.xml

对于HTTP / FTP,我在Pipes中播放简单的提取,使用url检索受密码保护的提要。 Get Password Protected Feed管道就是一个例子。

但是,Yahoo Pipes不支持SSL ...所以当我可以从浏览器发出https://user:password@host.tld/somethingsnazzy.xml这样的请求时,管道将会失败。解决方法涉及使用YQL访问受保护资源,因为它支持HTTPS:

select * from xml where url='https://host.tld/notpassswordbutstillsnazzy.xml'

虽然上面的声明工作正常,但是发出包含用户名和密码的安全HTTP请求仍然会产生401错误:

select * from rss where url='https://user:password@host.tld/somethingsnazzy.xml'

是什么给出了?

1 个答案:

答案 0 :(得分:2)

尝试this query

它使用https://gist.github.com/2248475

处的开放数据表
相关问题