If post > 280 first tweet must be almost 280 characters
This commit is contained in:
pare
e098fac88c
commit
f6b59b4de8
S'han modificat 1 arxius amb 4 adicions i 3 eliminacions
|
@ -167,11 +167,12 @@ if __name__ == '__main__':
|
||||||
if publish == 1:
|
if publish == 1:
|
||||||
|
|
||||||
toot_text = str(title)+'\n'
|
toot_text = str(title)+'\n'
|
||||||
toot_text += str(link)
|
|
||||||
|
|
||||||
toot_text = cleanhtml(toot_text)
|
toot_text = cleanhtml(toot_text)
|
||||||
toot_text = unescape(toot_text)
|
toot_text = unescape(toot_text)
|
||||||
|
|
||||||
|
toot_text += '\n' + str(link) + '\n'
|
||||||
|
|
||||||
print("Tooting...")
|
print("Tooting...")
|
||||||
print(toot_text)
|
print(toot_text)
|
||||||
|
|
||||||
|
@ -191,8 +192,8 @@ if __name__ == '__main__':
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|
||||||
toot_text1 = toot_text[:int(len(toot_text)/2)].rsplit(' ', 1)[0]
|
toot_text1 = toot_text[:275].rsplit(' ', 1)[0] + ' (1/2)'
|
||||||
toot_text2 = toot_text[int(len(toot_text1)):]
|
toot_text2 = toot_text[int(len(toot_text1)-6):] + ' (2/2)'
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
||||||
|
|
Loading…
Referencia en una nova incidència