2
我正在嘗試使用stumbleupon API來獲取有關我網站上的項目的信息。Stumbleupon API網址編碼問題
文檔:http://www.stumbleupon.com/help/badge-api-documentation/
現在,它完美的作品,除了一些網址的...
但http://lolbin.net/i/fp16jU82/that's-what-beer-is-for.htm
例如具有「在URL,這對StumbleUpon公司API的一個問題。
我曾嘗試過各種東西,但我不斷收到錯誤頁面:
http://www.stumbleupon.com/services/1.01/badge.getinfo?url=http://lolbin.net/i/fp16jU82/that's-what-beer-is-for.html
http://www.stumbleupon.com/services/1.01/badge.getinfo?url=http://lolbin.net/i/fp16jU82/that\'s-what-beer-is-for.html
http://www.stumbleupon.com/services/1.01/badge.getinfo?url=http://lolbin.net/i/fp16jU82/that%27s-what-beer-is-for.html
http://www.stumbleupon.com/services/1.01/badge.getinfo?url=http://lolbin.net/i/fp16jU82/that%252527s-what-beer-is-for.html
該項目是在StumbleUpon公司數據庫已經與很多意見:http://www.stumbleupon.com/url/lolbin.net/i/fp16jU82/that%252527s-what-beer-is-for.html
我的問題是,我該怎麼查詢這個特定的項目通過API,所以我得到一個有效的回報?
謝謝。 urlencoding的東西兩次使它的工作。 –
奇怪的是,在你的問題中,你試過對URL ['%27']進行單一編碼,並對它進行三重編碼['%252527'],但不對其進行雙重編碼。這總是你嘗試的最後一件事。 – Cheeso