2008-08-06から1日間の記事一覧
rss_sum が要るなら atom_sum も当然要るよねと. def atom_sum(s): from xml.dom import pulldom from hashlib import md5 acc = [] p = pulldom.parseString(xml_encoding_hack(s)) for (e, n) in p: if (e == pulldom.START_ELEMENT) and (n.tagName == 'e…
pulldom が EUC-JP 他に対応していなかったので作った手抜き関数. def xml_encoding_hack(xml): s = xml.splitlines()[0] if s.find('