mirror of
https://github.com/cquest/tootbot.git
synced 2024-11-23 20:11:06 +00:00
special processing for xkcd
This commit is contained in:
parent
35bc4aeb4f
commit
0fa5ecf96b
|
@ -107,6 +107,12 @@ if source[:4] == 'http':
|
|||
media_posted = mastodon_api.media_post(
|
||||
media.content, mime_type=media.headers.get('content-type'))
|
||||
toot_media.append(media_posted['id'])
|
||||
for p in re.finditer(r"https://imgs.xkcd.com/[^ \"]*", t.summary):
|
||||
print(p.group(0))
|
||||
media = requests.get(p.group(0))
|
||||
media_posted = mastodon_api.media_post(
|
||||
media.content, mime_type=media.headers.get('content-type'))
|
||||
toot_media.append(media_posted['id'])
|
||||
|
||||
if 'links' in t:
|
||||
for l in t.links:
|
||||
|
|
Loading…
Reference in New Issue
Block a user