Skip to content
This repository was archived by the owner on Aug 7, 2024. It is now read-only.

Commit 13dd590

Browse files
authored
Update api.py
`words` is a list containing separated words. Thus, it should not be passed into `is_url()` as a string.
1 parent dc13a39 commit 13dd590

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

twitter/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1435,7 +1435,7 @@ def _TweetTextWrap(self,
14351435
line_length = 0
14361436
words = re.split(r'\s', status)
14371437

1438-
if len(words) == 1 and not is_url(words):
1438+
if len(words) == 1 and not is_url(words[0]):
14391439
if len(words[0]) > 140:
14401440
raise TwitterError({"message": "Unable to split status into tweetable parts. Word was: {0}/{1}".format(len(words[0]), char_lim)})
14411441
else:

0 commit comments

Comments
 (0)