mirror of
http://aero2k.de/t/repos/urlbot-native.git
synced 2017-09-06 15:25:38 +02:00
don't write anything for non text/* URLs
This commit is contained in:
@@ -112,13 +112,8 @@ def extract_url(data):
|
|||||||
if 0 == status:
|
if 0 == status:
|
||||||
message = 'Title: %s: %s' % (title.strip(), e(r))
|
message = 'Title: %s: %s' % (title.strip(), e(r))
|
||||||
elif 1 == status:
|
elif 1 == status:
|
||||||
# of course it's fake, but it looks interesting at least
|
logger('info', 'no message sent for non-text %s (%s)' %(r, title))
|
||||||
char = """,._-+=\|/*`~"'"""
|
continue
|
||||||
message = 'No text but %s, 1-bit ASCII art preview: [%c] %s' %(
|
|
||||||
e(title),
|
|
||||||
random.choice(char),
|
|
||||||
e(r)
|
|
||||||
)
|
|
||||||
elif 2 == status:
|
elif 2 == status:
|
||||||
message = 'No title: %s' % (e(r))
|
message = 'No title: %s' % (e(r))
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user