Twitter bot ¤òºî¤ë

»²¹Í¥µ¥¤¥È

  1. Perl¤Ë¤è¤ëTwitter bot¤Îºî¤êÊý
  2. twitter bot¤ò¤Ä¤¯¤Ã¤Æ¤ß¤ë¡£(3) - bot¤Î¥×¥í¥°¥é¥ß¥ó¥°
  3. Perl¤ÇTwitter¥¯¥é¥¤¥¢¥ó¥ÈÀ½ºî¥á¥â ¤½¤Î1
  4. CPAN string-similarity
  5. UTF-8¤Î¥Õ¥é¥°
  6. UTF-8¤Î¥Õ¥é¥°

Perl CPAN Net::Twitter ¤òÍøÍѤ¹¤ë¡¡OAuth¤òÍøÍѤ¹¤ë

  1. twitter botÍѤÎ(¼Î¤Æ)¥¢¥«¥¦¥ó¥È¤òºîÀ®¤¹¤ë
  2. OAuth ¤ËɬÍפʾðÊó¤òÆÀ¤ë
  3. »²¹Í¥µ¥¤¥È¤ò¥³¥Ô¥Ú¤·¤Æ¡¤¼Â¹Ô¤·¤Æ¤ß¤ë
    	#!/usr/bin/perl
    	use strict;
    	use Net::Twitter;
    	use utf8;
    	binmode STDOUT, ":utf8";
    	
    	my $consumer_key = "<<<YOUR OWN consumer key>>>";
    	my $consumer_secret = "<<<YOUR OWN consumer secret>>>";
    	my $access_token = "<<<YOUR OWN access token>>>";
    	my $access_token_secret = "<<<YOUR OWN access token secret>>>";
    	
    	my $handle = Net::Twitter->new({
    	    traits => [qw/OAuth API::REST API::Search/],
    	    consumer_key => $consumer_key,
    	    consumer_secret => $consumer_secret,
    	    access_token => $access_token,
    	    access_token_secret => $access_token_secret});
    	
    	#do_search($_) foreach @ARGV;
    	
    	my $msg = "¤Æ¤¹¤ÈÅê¹Æ¤Ç¤¹";
    	my $handle = Net::Twitter->new({
    	    traits => [qw/OAuth API::REST/],
    	    consumer_key => $consumer_key,
    	    consumer_secret => $consumer_secret,
    	    access_token => $access_token,
    	    access_token_secret => $access_token_secret});
    	my $ret = $handle->update({status=>$msg});
    	print "Cannot post!!" unless $ret;
    	
    	sub do_search {
    	    my $term = shift;
    	
    	    my @results;
    	    my $rs = $handle->search({q=>$term, lang=>"ja", page=>1, rpp=>100});
    	    if (ref $rs eq 'HASH' && exists $rs->{results}) {
    	        if (@{$rs->{results}}) {
    	            print_post($_) foreach @{$rs->{results}};
    	        }
    	    }
    	}
    	
    	sub print_post {
    	    my $t = shift;
    	
    	    print "$t->{from_user} (on $t->{created_at})  $t->{text}\n";
    	}
  4. cron(Äê´üŪ¤Ë¥³¥Þ¥ó¥É¤ä¥×¥í¥°¥é¥à¤ò¼Â¹Ô¤¹¤ë)

ÌäÂê

  1. Wide character in ...

¼«Ê¬¤Î¥Ü¥Ã¥È

  • ¤·¤¤¤Ê¤Á¤ã¤ó¤Ü¤Ã¤È¡¡https://twitter.com/seana_bot
    	º£¸å¡¤¤Þ¤¸¤á¤Ë´Ñ¸÷°ÆÆâ¤ò¤¹¤ëͽÄê
  • ¤¦¤é¤·¤¤¤Ê¤Á¤ã¤ó¤Ü¤Ã¤È¡¡https://twitter.com/kmry_bot
    	´ÏÀ¤Î¥Ü¥Ä¤Ë¤Ê¤Ã¤¿¥Æ¡¼¥Þ¤ò¼ÂÁõ¤·¤Æ¤ß¤¿
    	¤Á¤ç¤Ã¤ÈÈÜàФʰõ¾Ý¤ò¼õ¤±¤ëñ¸ì¤ËÊÑ´¹¤·¤ÆÊÖ¿®¤¹¤ë¥Ü¥Ã¥È
    	Twitter ¤Ë¤â¤«¤«¤ï¤é¤º¡¤¤è¤¯Ê¹¤­¼è¤ì¤Ê¤¤¤È¤¤¤¦...ÀßÄê
    	¤¦¤é¤·¤¤¤Ê¤Á¤ã¤ó¤Ï¡¤¡Ö¤¨¡¤¡û¡û¤Ã¤Æ¸À¤Ã¤¿¤Î¡©¡×¤Èʹ¤­ÊÖ¤¹
    ¤·¤¤¤Ê¤Á¤ã¤ó¤¦¤é¤·¤¤¤Ê¤Á¤ã¤ó
    seana-chan.pngseana-chan-2.png

¡Úº£¸å¡Û¼«Ê¬°¸¤Î¥Ä¥¤¡¼¥È¤ò¼èÆÀ¤·¤Æ¡¤²òÀϤ·¤Æ¡¤ÊÖ¿®¥Ä¥¤¡¼¥È¤ò¤¹¤ë

  1. ¼«Ê¬°¸¤Î¥Ä¥¤¡¼¥È¤¬¤¢¤ë¤Î¤«Äê´üŪ¤Ë³Îǧ¤¹¤ë
    • $ ./twitter-search.pl "kmry_bot"
      • seana_bot (on Thu, 13 Dec 2012 04:49:00 +0000) @kmry_bot º£Æü¤ÏÀ㤬¤¿¤¯¤µ¤óÀѤâ¤Ã¤Æ¤¤¤¿¤Î¤ÇÀ㤫¤­¤ò¤·¤Æ¤­¤Þ¤·¤¿¡£
      • kmry_bot (on Thu, 13 Dec 2012 03:48:39 +0000) ¤Æ¤¹¤ÈÅê¹Æ¤Ç¤¹
    • $ ./twitter-search.pl "@kmry_bot"
      • seana_bot (on Thu, 13 Dec 2012 04:49:00 +0000) @kmry_bot º£Æü¤ÏÀ㤬¤¿¤¯¤µ¤óÀѤâ¤Ã¤Æ¤¤¤¿¤Î¤ÇÀ㤫¤­¤ò¤·¤Æ¤­¤Þ¤·¤¿¡£
  2. ¼«Ê¬°¸¤Î¥Ä¥¤¡¼¥È¤ÎÆâÍƤ¬¤¢¤ì¤Ð¡¤ÆâÍƤò¼¡¤Î¤è¤¦¤Ëʬ¤±¤ë
    • Áê¼ê¤Î¥¢¥«¥¦¥ó¥È̾
    • ËÜʸ
    • URL
    • ¥Ï¥Ã¥·¥å¥¿¥°
  3. ¾åµ­¤«¤é¡¤ËÜʸ¤Î¤ß¤òÃê½Ð¤·¡¤·ÁÂÖÁDzòÀÏ¡¤¹½Ê¸²òÀϤò¹Ô¤¦
  4. ¡û¡û¼êË¡¤òÍѤ¤¤Æ¡¤¡ÊÁê¼ê¤ÎID¤ò¤Ä¤±¤Æ¡ËÊÖÅú¤¹¤ë
    • ¡û¡û¼êË¡¤Ï¡¤¼«Ê¬¤Ç¹Í¤¨¤ë
  5. ÆÀ¤é¤ì¤¿¾ðÊó¤ò¥í¥°¤Ë»Ä¤¹

ÌÚ¼¥¼¥ßÀ¸¸ÂÄê

ÊÔ½¸²èÌÌ
¥¼¥ßÀ¸
2021-2022ǯÅÙÀ¸(14´ü)
°¤ÉôÍÚÂçÆâñ¥
²¬ÅÄ°¼²»¶½À±ÍÛ
³á±ï²ÏÌîͳÌï
º´¡¹ÌÚô¥º´¡¹ÌÚÈþÇÈ
ßÀÅÄϵ®×¢µÈϵ®
Æ£°æ°ì»ÖÆ£ÅĽ¡¿¿
2020-2021ǯÅÙÀ¸(13´ü)
¾®ß·¿¿ô¥³Þ¸¶Í­¿¿
²ÃÆ£ÀµÃè³÷ÅÄÌöÅÍ
ºä¼Íã½»µÈ¿¿Æà
¹âÌîÂç²ÏÃæ°æÍÕ·î
±ÊÞ¼·ÊÍ´Ê¿´ÛºÚ¡¹»Ò
2019-2020ǯÅÙÀ¸(12´ü)
Âç°²¶³Ê¿--
¶áÆ£ÂÀͺÀ¶¿åÈþΤ
Ãæ¼²ÄÎçÊ¡»³³èµ¯
Ê¡²ÈÍ´µªÁ¥±ÛÅ·ºÌ
Æ°áΤ»³²¼²À·î
ºäËÜÎÃÂÀÅÚ²°ºÌ²Æ
2018-2019ǯÅÙÀ¸(ÉÔºß)
SEA-NAÂåɽ¼èÄùÌò
Ê¿²ìľµ±²£»³è½²Ö
½»µÈ¼Âµ§¼¼¶¶ÏºÈ
2017-2018ǯÅÙÀ¸(11´ü)
ÀйõÛÙÆà°ìµÜÂó³¤
µµ°æ³¤½®º´Æ£ÛÙ
º´Æ£Í­´õÉ°¿¹Âó¿¿
Æ£Ëܼë²Æ¥Û¥ï¥¤¥È¥¸¥Ë¡¼
ÁýÅÄÍ¥ºîëÆâ·òÂÀ
2016-2017ǯÅÙÀ¸(10´ü)
°ËÆ£¤ß¤­²¬Åç·ò¸ç
¾®À¾ÀãÍÕÍ´ÀîÂÙµ±
ÎëÌÚͤºÚÂçÌçÂó»Ë
ÅÄƬ¤ï¤«¤Ð¸ÍÅèºéÊæ
Ãæ¼ÃÒµ®À¾ÌîůÀ¸
²£»³Í´²ÌÀî´ßÍ´²Ì
2015-2016ǯÅÙÀ¸(09´ü)
Àõ²ì¼·³¤¾®ÎÓ¿¿ºÚ
À¾Â¼°Ë±ûËÙ¹¾ÃÎ̤
¿ËÀ¸°Ô´õ¼¾å¹ÀÂÀ
2014-2015ǯÅÙÀ¸(08´ü)
ÂçÀÐÀ¿ÂçÌÂÀϯ
²Ãƣ͵¼ùº´¡¹ÌÚº¸¶á
¹â¶¶Íýº»ÉðÅÄè½Êæ
»ûÅçÉñ»ÒȪ²ìÂç
»³ÅĽ¤À¤
2013-2014ǯÅÙÀ¸(07´ü)
²ÃÆ£»Ë¿¥¹©Æ£ÃÒ»Ò
º´¡¹ÌÚÍÕ»Ò»Ö³ù¼þ
¹â¶¶¸¼Î¶üâ¾¾æÆ
ÃæÈøÀéºéÃæÀîÎèºÚ
Ãæé®Âçµ®
2012-2013ǯÅÙÀ¸(06´ü)
±óÆ£À±ÃÏÂçÌî¼Óµ¨
³ùÅĤᤰ¤ßÌÚ²¼ÏÂÂç
ã·ÌÚÎò𺴡¹ÌÚÍÚ
º´Æ£Í¥»Ò¾Â߷ʸ¹á
¸Å²°¿¿ÍýµÈÅÄÃÒ¹°
2010-2011ǯÅÙÀ¸(05´ü)
°±¸¶»ËÉÒ°ËÆ£Â絯
°ËÆ£¤ß¤É¤ê±Êºäʸǵ
Æ£ÅĹҺÈÁ°Â¿ÂçÊå
¾¾ËÜÎÍͤµÜÄÅÍ­º»
»³ÅÄ°¡µ¨
2009-2010ǯÅÙÀ¸(04´ü)
´ßËÜδ»Ö·¦ÃÏͳ·Ã
»Ö²ìÀéÄáÄÅÅÄÍ­»Ò
»°±º¹©Ìï
2008-2009ǯÅÙÀ¸(03´ü)
°ÀÄŹ¯Í¤°æ¾å¤µ¤æ¤ê
Ë̺êͤ¼ù¹©Æ£Ï´²
¸ÅËóÍ¥²Öº´Àî¾´¹¨
º´Æ£Ä÷ÍÎÎëÌÚ°¡°á
Ãݸ¶´õÈþÆ£°æÍ¥ºî
ËÙ¸ø°ìËÙÆâ¾®¿¥
ÊÆß·¹¨»Ë
2007-2008ǯÅÙÀ¸(02´ü)
º´Æ£·òÂÀ¾å¼²Â¹°
±üÅÄ·¼µ®¾®ÌîÀ¿
Çò°æ¤«¤º¤ß¹â°æÍDzð
¿¹Ã«Î¼²ðÏ»ÅÏÍ­Íü·Ã
¼ãËÜůʿ
2006-2007ǯÅÙÀ¸(01´ü)
¿û°æ°´ÅÏÉô¸¬ÂÀϺ
Áêºä¿¿Â缲¿µ
±üÅí»Ò³Þ°æÌÔ
¾®ÎÓϹ¬óîÆ£¤¤¤Ä¤³
óîƣͺµªº´¡¹ÌÚËã̤
º´Æ£Æü²ÃÍùëËܵ®Ç·
ÆÁ¹¾Í¤²ðĹÎææûÊ¿
À¾Ëܤߤ椭ÎÓ³¨Î¤»Ò
ß·ÅÄÂçµ±

źÉÕ¥Õ¥¡¥¤¥ë: fileseana-chan.png 1429·ï [¾ÜºÙ] fileseana-chan-2.png 1393·ï [¾ÜºÙ]