The Artima Developer Community
Sponsored Link

Python Buzz Forum
delicious-py slightly broken

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
maxim khesin

Posts: 251
Nickname: xamdam
Registered: Mar, 2005

Maxim Khesin is developer for Liquidnet. I like C++, python, attend design patterns study group/NYC.
delicious-py slightly broken Posted: Oct 11, 2005 8:18 PM
Reply to this message Reply

This post originated from an RSS feed registered with Python Buzz by maxim khesin.
Original Post: delicious-py slightly broken
Feed Title: python and the web
Feed URL: http://feeds.feedburner.com/PythonAndTheWeb
Feed Description: blog dedicated to python and the networks we live in
Latest Python Buzz Posts
Latest Python Buzz Posts by maxim khesin
Latest Posts From python and the web

Advertisement
I was staying up last night implementing my next del.icio.us experiment, only to find that an essential (for this experiment) part of delicious-py, get_posts_by_url() is broken. It's not that surprising, as it is one of the DeliciousNOTAPI set of functions, which are basically HTML scrapes and subject to breakage by Joshua and Co any time.

Still I was feeling kind of down, as one of my favorite toy's legs were falling off.

Well, it was late enough and I said what the heck, I can do it myself. I took a look at the original code and it was using the (in)famous SGMLParser override technique. I hate it (and wish Mark would stop teaching it!) as it forces you to keep context state inside weird member variables. Just take a look at HtmlToPosts class in the original delicious module. I guess it's SAX vs DOM thing...

I much prefer the search + hierarchical navigation approach of BeautifulSoup. In case anyone needs this, here is my version of get_post_by_url.

I am kind of starting to wish BeautifulSoup would make it into the basic Python distro. That's a lot of batteries (in a small package, to boot) that should be included.

Read: delicious-py slightly broken

Topic: Neckar Zope 3 sprint - summary Previous Topic   Next Topic Topic: <Java>

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use