From: Sean Graham Date: Fri, 13 Feb 2009 17:08:28 +0000 (+0800) Subject: changed the way i replace the lj-user tags; lj usernames allow underscores, X-Git-Url: http://www.wagner.pp.ru/gitweb/?a=commitdiff_plain;h=138ca60b401b1581fb3017359f310f8e773c1cb0;hp=5d84d72f008804ca468858362331efca87103e19;p=oss%2Fljdump.git changed the way i replace the lj-user tags; lj usernames allow underscores, domains do not. Rather that converting the underscores to hyphens, I used the alternate URL scheme supported by LJ disabled the lj-embed code until i can figure out how to make it actually work Signed-off-by: Greg Hewgill --- diff --git a/convertdump.py b/convertdump.py index 9799cab..4eb143d 100755 --- a/convertdump.py +++ b/convertdump.py @@ -199,7 +199,7 @@ def replaceLJTags(entry): embedRE = re.compile('', re.IGNORECASE) # replace lj user tags - rv = re.sub(userRE, '\\1', rv) + rv = re.sub(userRE, '\\1', rv) # replace lj comm tags rv = re.sub(commRE, '\\1', rv) @@ -210,7 +210,10 @@ def replaceLJTags(entry): rv = re.sub(cutRE, '', rv) # replace lj-embed tags - rv = re.sub(embedRE, '', rv) + # this doesn't actually work. LJ doesn't include the embedded content + # when ljdump calls 'getevents', but instead includes an lj-embed tag + # with an id and nothing else. + #rv = re.sub(embedRE, '', rv) return rv