在Python3.5中使用 The del.icio.us API

來源:互聯網
上載者:User

標籤:with   python安裝   end   項目   http   pop   int   使用   span   

問題:參考《集體智慧編程》一書的第二章中訪問del.icio.us網站的資料需要使用到事先編好的Python API。但是書上提供的API並不適用與Python3.5的版本。

解決方案:在Google搜尋pydelicious for python3.5,第一個github項目,把他所提供的pydelicious.py下載下來,添加到python安裝目錄的lib中即可

出現的情況:登入這個github項目需要FQ,如果不FQ可以用網頁快照式複寫下;在使用的pydelicious的時候先要pip feedparser

測試:print(pydelicious.get_popular(tag=‘programming‘))


輸出:[{‘hash‘: ‘‘, ‘user‘: ‘delicious‘, ‘description‘: ‘Sponsored: 64% off Code Black Drone with HD Camera‘, ‘dt‘: ‘‘, ‘href‘: ‘https://shop.icio.us/sales/the-limited-edition-black-hawk-drone-hd-camera?utm_source=del.icio.us&utm_medium=referral&utm_campaign=the-limited-edition-black-hawk-drone-hd-camera‘, ‘extended‘: ‘Our #1 Best-Selling Drone--Meet the Dark Night of the Sky!‘, ‘tags‘: ‘‘, ‘count‘: ‘‘}, {‘hash‘: ‘‘, ‘user‘: ‘‘, ‘description‘: ‘something went wrong‘, ‘dt‘: ‘‘, ‘href‘: ‘‘, ‘extended‘: ‘‘, ‘tags‘: ‘‘, ‘count‘: ‘‘}]

在Python3.5中使用 The del.icio.us API

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.