def OCRImage(self, imageUrl, splitLength=None): # //////////////////////////////////////// # Call ocr.space API, wait and return list of tweets ocrResult = self.ocr_api.ocr_url(imageUrl) if splitLength != None: tweetsToSend = Splitter.forTweets( ocrResult, splitLength=splitLength ) # tweet length limits (280-8-15) user name and brackets else: tweetsToSend = Splitter.forTweets(ocrResult) if DEBUG: print(" Tweet chain length {}".format(len(tweetsToSend))) return tweetsToSend
def OCRImage(self,imageUrl): # Call ocr.space API, wait and return list of tweets ocrResult = self.ocr_api.ocr_url(imageUrl) tweetsToSend = Splitter.forTweets(ocrResult) # tweet length limits (280-8-15) user name and brackets print(" Tweet chain length {}".format(len(tweetsToSend))) return tweetsToSend