Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
La Quadrature du Net
rpteam
wantzel
Commits
46221f03
Commit
46221f03
authored
Jan 08, 2017
by
Mindiell
Browse files
Ajout d'un debug sur le touittage de la RP
parent
8edbf21a
Changes
1
Hide whitespace changes
Inline
Side-by-side
wantzel.py
View file @
46221f03
...
...
@@ -174,9 +174,10 @@ def tweet(message):
twitter
=
Twitter
(
auth
=
auth
)
try
:
Utils
.
debug
(
"Tweeting: %s"
%
message
)
twitter
.
statuses
.
update
(
status
=
message
)
result
=
twitter
.
statuses
.
update
(
status
=
message
)
Utils
.
debug
(
"Result: %s"
%
result
)
except
Exception
:
pass
Utils
.
error
(
"Erreur lors du tweet"
)
class
Wantzel
(
object
):
...
...
@@ -827,7 +828,7 @@ class Wantzel(object):
if
len
(
title
)
+
min
(
len
(
link
),
23
)
>
135
:
# What is the number of chars we need to remove
excess
=
len
(
title
)
+
min
(
len
(
link
),
23
)
-
135
title
=
''
.
join
([
title
[:
-
(
excess
+
4
)],
'
...
'
])
title
=
''
.
join
([
title
[:
-
(
excess
+
2
)],
'
…
'
])
tweet
(
messages
[
"tweet_rp_%s"
%
language
]
%
(
title
,
link
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment