- quotedtweet = getTweet(toReplace, twitapi, inclusion=True) # inclusion parameter limits recursion.
- tweetText += " Q{" + quotedtweet + "}"
+ if recurlvl > 2:
+ stringsout = [ "{{ Recursion level too high }}" ] + stringsout
+ else:
+ quotedtweet = getTweet(toReplace, twitapi, inclusion=True, recurlvl=recurlvl+1) # inclusion parameter limits recursion.
+ if not quotedtweet:
+ quotedtweet = [""]
+ quotedtweet[0] = "Q{ " + quotedtweet[0]
+ quotedtweet[-1] += " }"
+ stringsout = quotedtweet + stringsout
+