Created
August 6, 2014 07:57
-
-
Save Akkiesoft/0ab4f29e37d8d5b9dff3 to your computer and use it in GitHub Desktop.
そんな楽ではなさそうっていうか、抽出タブでやれってかんじだ
This file contains hidden or 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
Plugin.create(:mikutter_profile_media) do | |
profiletab :usermediatimeline, _("最近の画像つきツイート") do | |
set_icon Skin.get("aclog.png") | |
uid = user.id | |
i_timeline = timeline nil do | |
order do |message| | |
retweet = message.retweeted_statuses.find{ |r| uid == r.user.id } | |
(retweet || message)[:created].to_i end end | |
Service.primary.user_timeline(user_id: user[:id], include_rts: 1, count: [UserConfig[:profile_show_tweet_once], 200].min).next{ |tl| | |
tl.each do |message| | |
if message[:entities][:media] | |
i_timeline << message | |
end | |
end | |
}.terminate(_("@%{user} の最近のつぶやきが取得できませんでした。見るなってことですかね") % {user: user[:idname]}) | |
timeline_storage[i_timeline.slug] = user end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
こうしたら画像ツイートがたくさん取れた
https://gist.github.com/toshia/ee2c358b70ee7f690e82