Last active
July 30, 2018 21:15
-
-
Save pooza/f33d2122f4bfd41bd56848e982e7dbf3 to your computer and use it in GitHub Desktop.
公開トゥートに含まれる画像/動画を抜き出す。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
attachments.id AS attachment_id, | |
toots.id AS toot_id, | |
attachments.file_content_type AS content_type, | |
attachments.file_file_name AS file_name, | |
attachments.file_file_size AS file_size, | |
attachments.file_meta AS meta, | |
attachments.updated_at | |
FROM media_attachments AS attachments | |
INNER JOIN statuses AS toots ON attachments.status_id=toots.id | |
INNER JOIN accounts ON toots.account_id=accounts.id | |
WHERE (accounts.domain IS NULL) | |
AND (accounts.locked='f') | |
AND (toots.visibility=0) | |
ORDER BY toots.updated_at DESC | |
LIMIT 100 OFFSET 0; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
toots.visibility をいじれば未収載も含められるはず。
というか、想定している用途はむしろこちら。