# Copyright (c) 2005-2010 Greg Hewgill and contributors
import codecs, os, pickle, pprint, re, shutil, sys, urllib2, xml.dom.minidom, xmlrpclib
# Copyright (c) 2005-2010 Greg Hewgill and contributors
import codecs, os, pickle, pprint, re, shutil, sys, urllib2, xml.dom.minidom, xmlrpclib
if item['item'][0] == 'L':
print "Fetching journal entry %s (%s)" % (item['item'], item['action'])
try:
if item['item'][0] == 'L':
print "Fetching journal entry %s (%s)" % (item['item'], item['action'])
try:
r = urllib2.urlopen(urllib2.Request(Server+"/export_comments.bml?get=comment_meta&startid=%d%s" % (maxid+1, authas), headers = {'Cookie': "ljsession="+ljsession}))
meta = xml.dom.minidom.parse(r)
except Exception, x:
print "*** Error fetching comment meta, possibly not community maintainer?"
print "***", x
r = urllib2.urlopen(urllib2.Request(Server+"/export_comments.bml?get=comment_meta&startid=%d%s" % (maxid+1, authas), headers = {'Cookie': "ljsession="+ljsession}))
meta = xml.dom.minidom.parse(r)
except Exception, x:
print "*** Error fetching comment meta, possibly not community maintainer?"
print "***", x
+ nxid=meta.getElementsByTagName("nextid")
+ if len(nxid):
+ nxid = nxid[0].firstChild.nodeValue
+ else:
+ nxid = None
+ print "Got meta data maxid = %d nextid=%s"%(
+ int(meta.getElementsByTagName("maxid")[0].firstChild.nodeValue),
+ nxid
+ )
meta = xml.dom.minidom.parse(r)
except Exception, x:
print "*** Error fetching comment body, possibly not community maintainer?"
meta = xml.dom.minidom.parse(r)
except Exception, x:
print "*** Error fetching comment body, possibly not community maintainer?"