コード例 #1
0
    def addStoryToBookmate(self):
        lastUploadedStoryHash = self.getLastUploadedStoryHash()

        if lastUploadedStoryHash == self.hash:
            return False
        else:
            bookmateRequest = HTTPHandler("tmp/SmartfictionCookie.tmp")
#            http://smartfiction.ru/prose/bride_and_tiger/#comments
            splitedUrl = self.url.split('#',1)
            
            uploadStatus = bookmateRequest.linkStoryToBookmate(splitedUrl[0])
            
            if uploadStatus:
                if self.bookStoredOnBookmate():
                    self.saveUploadedStoryHash()
                    self.saveFeedHash()
                    return True
                else:
                    return False
            else:
                return False