Re-reblog Bot

Documentation

akibasho



資料の置き場所
mcsgsym.tumblr.com/akibasho

自己紹介

twitter

http://twitter.com/gkojax

http://gkojax.tumblr.com/

リブログ少なめ

http://mcsgsym.tumblr.com/

リブログ多め

Re-reblog Bot

  • APIからデータを取得
  • ローカルのMySQLに貯める
  • 掘り起こして再度リブログする
Tumblrに流れてくるポストって時事ネタを抜かせば、いつ見ても面白い物は面白いかなと。例えば1年前にポストしたものを今リブログしたら、最近始めた人は新鮮な気持ちでリブログするだろうし、1年前からtumblrやってた人は懐かしい気持ちで改めてリブログするだろうし。昔のやつでもリブログ数伸びるので見てて面白い。

APIからデータを取得

リブログしたものは

reblog_keyが一緒になる!

eri-eri-kamei-eri.tumblr.com/post/13395547613

mcsgsym.tumblr.com/post/13501396948

APIからデータを取得

"posts": [
   {
      "blog_name": "mcsgsym",
      "id": 13501396948,
      "type": "photo",
      "date": "2011-07-09 22:09:47 GMT",
      "reblog_key": "EmoOSPfo",
      "note_count": 18,
CREATE TABLE reblogs (
  reblog_key varchar(10) NOT NULL,
  posttype int(1) NOT NULL DEFAULT 0,
  count int(11) NOT NULL DEFAULT 0,
  lastdate datetime NOT NULL DEFAULT '1970-01-01 09:00:00',
)

CREATE TABLE postinfos (
  reblog_key varchar(10) NOT NULL,
  user varchar(32) NOT NULL,
  postid bigint(20) NOT NULL,
)


1つのreblog_keyに複数のポストがぶら下がる1対他の関係。

自分のPCのMySQLに保存



対象

  • Photo
  • ひらがなを1文字以上含むQuote

データ量が!

mcsgsym183,394
jacony187,594
ipodstyle195,303
kazukij197,922
winmaikosyu203,771
ak47208,299
kondot213,609
sratums220,360
d-d-d232,422
lunaryue252,285
ginzuna264,333
petapeta278,886
reretlet320,340
nemoi327,059
774408,894
hsmt438,162
nagas860,502



巡回先を増やしたいけど増やせない

【緩募】MySQLチューニング詳しい人

【緩募】すごいDBサーバー

bot紹介1

bot紹介1

XXX notes以上のものを順にリブログしていくだけ

100notes以上

classics.tumblr.com/

750notes以上

classics2.tumblr.com/

10000notes以上

over10000notes.tumblr.com/

bot紹介2

A:posttypeがphotoの中で

B:lastdateが1年以上前で

C:ユーザー XXX がリブログしているもの



(というwhere文)

bot紹介2

A:posttypeがphotoの中で

B:lastdateが1年以上前で

C:ユーザー XXX がリブログしているもの



kagurazakaundergroundresistance.tumblr.com

C:gkojax、mcsgsym等自分のアカウント

bot紹介2

A:posttypeがphotoの中で

B:lastdateが1年以上前で

C:ユーザー XXX がリブログしているもの



scalable.tumblr.com

C:yasunao、rosarosa、sayusayukawaii等知人のアカウント

bot紹介2

A:posttypeがphotoの中で

B:lastdateが1年以上前で

C:ユーザー XXX がリブログしているもの



weekendneverdies.tumblr.com

C:二次元画像が多いのアカウント

bot紹介2

A:posttypeがphotoの中で

B:lastdateが1年以上前で

C:ユーザー XXX がリブログしているもの



eri-eri-kamei-eri.tumblr.com

C:ハロプロの画像が多いのアカウント

bot紹介2

A:posttypeがphotoの中で

B:lastdateが1年以上前で

C:ユーザー XXX がリブログしているもの



kashiyukalovelove.tumblr.com

C:かしゆか多めのアカウント

bot紹介2

A:posttypeがphotoの中で

B:lastdateが1年以上前で

C:ユーザー XXX がリブログしているもの



gkojaz.tumblr.com

C:特に指定無し

bot紹介2

C:の部分の変更によっていろいろなbotが作れるパターン。

bot紹介3

A:posttypeがquoteの中で

B:lastdateが XXX 以上前で

(というwhere文)

bot紹介3

1ヶ月以上前

gkojax-text.tumblr.com

1年以上前

gkojay.tumblr.com

3年以上前

yasaiitame.tumblr.com

bot紹介4

特定のアカウントの中から100notes以上のものをリブログ

yasunao.tumblr.com

yasunao-over100notes.tumblr.com

rosarosa.tumblr.com

rosarosa-over100notes.tumblr.com

この資料作りかけです。