* tests/nose/test_newsite.py (TestNewSite.test_delicious): Add
test cases for new style delicious urls.
* services/command/delicious.py (Delicious.isDelicious): Add
support for new-style delicious urls.
git-svn-id: svn://trac.whoisi.com/whoisi/trunk@2
ae879524-a8bd-4c4c-a5ea-
74d2e5fc5a2c
+2008-09-30 Christopher Blizzard <blizzard@0xdeadbeef.com>
+
+ * tests/nose/test_newsite.py (TestNewSite.test_delicious): Add
+ test cases for new style delicious urls.
+
+ * services/command/delicious.py (Delicious.isDelicious): Add
+ support for new-style delicious urls.
+
2008-09-19 Christopher Blizzard <blizzard@0xdeadbeef.com>
* utils/utils.cfg: New file for utils that includes database
path = u[2]
# site url
- # http://del.icio.us/chrisfralic - base
+ # http://del.icio.us/chrisfralic - base (old style)
+ # http://delicious.com/chrisfralic - base (new style)
# feeds
# http://del.icio.us/rss/danicomar - bookmarks
# http://feeds.delicious.com/rss/danicomar - bookmars after redirect
+ # http://feeds.delicious.com/v2/rss/chrisfralic?count=15 (new form)
# http://del.icio.us/rss/tags/danicomar - tags (do not want)
# http://feeds.delicious.com/rss/tags/danicomar - tags after redirect (do not want)
- if host == "del.icio.us" and re.match('^/([^/]+$)', path):
+ if (host == "del.icio.us" or host == "delicio.us" or host == "delicious.com") and re.match('^/([^/]+$)', path):
+ return True
+
+ if host == "feeds.delicious.com" and re.match('^/v2/rss/([^/]+$)', path):
return True
return False
Test to make sure we can detect del.icio.us urls
"""
good_urls = ['http://del.icio.us/something',
- 'http://del.icio.us/foo']
+ 'http://del.icio.us/foo',
+ 'http://delicious.com/foo',
+ 'http://delicio.us/foo',
+ 'http://feeds.delicious.com/v2/rss/chrisfralic?count=15']
bad_urls = ['http://del.icio.us/',
'http://del.icio.us/something/rss',
- 'http://something.else']
+ 'http://something.else',
+ 'http://feeds.delicious.com/v2/rss/tags/chrisfralic?count=15']
for i in good_urls:
x = Delicious()