Changeset 35889d4 in lab.git for twitter/twitterbot.pl


Ignore:
Timestamp:
Sep 13, 2010 11:02:26 PM (14 years ago)
Author:
mitty <mitty@…>
Branches:
master, trunk
Children:
c273ad8
Parents:
035465b
Message:
  • different since_id options on mentions, search

git-svn-id: https://lab.mitty.jp/svn/lab/trunk@52 7d2118f6-f56c-43e7-95a2-4bb3031d96e7

File:
1 edited

Legend:

Unmodified
Added
Removed
  • twitter/twitterbot.pl

    red4ab0c r35889d4  
    2020my $stat = loadconf("$Bin/status.yml"); 
    2121if (! defined $stat) { 
    22     $stat = { 
    23         # do not set to 0 
    24         since_id => 1, 
    25     }; 
     22    $stat = {}; 
    2623} 
    2724 
     
    3431my $tweet; 
    3532 
    36 $tweet = or_search($bot, $conf->{hashtag}, $stat->{since_id}); 
     33$tweet = or_search($bot, $conf->{hashtag}, $stat->{search}); 
    3734if ($tweet) { 
    3835    %tweets = (%tweets, %$tweet); 
    3936} 
    4037 
    41 $tweet = mentions_ids($bot, $stat->{since_id}); 
     38$tweet = mentions_ids($bot, $stat->{mention}); 
    4239if ($tweet) { 
    4340    %tweets = (%tweets, %$tweet); 
     
    6259    } 
    6360     
    64     $stat->{since_id}  = $id; 
     61    $stat->{$tweets{$id}} = $id; 
    6562} 
    6663 
     
    113110    my $bot      = shift @_; 
    114111    my $keywords = shift @_; 
    115     my $since_id = shift @_; 
     112    my $since_id = shift @_ || 1; 
    116113     
    117114    my $key = ""; 
     
    162159     
    163160    my $bot      = shift @_; 
    164     my $since_id = shift @_; 
     161    my $since_id = shift @_ || 1; 
    165162     
    166163    my $res; 
Note: See TracChangeset for help on using the changeset viewer.