• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags

Frequently used words (click to add to your profile)

javaandroidc++linuxc#objective-ccocoa誰得qtrubypythonwindowsphpgamebathyscaphegui翻訳comegattwitterframeworkbtronvb.net計画中(planning stage)testdomarduinodirectxpreviewerゲームエンジン

Commit MetaInfo

Revision4316cc91821f1b9d8d03484860e3becdb620f22b (tree)
Zeit2008-06-26 00:36:10
Autorikeji <ikeji@f836...>
Commiterikeji

Log Message

read more diaryes

git-svn-id: http://dev.ikejima.org/src/svn/pragger/trunk@385 f8368ae4-1e99-dc11-9799-0018f35ab5fa

Ändern Zusammenfassung

Diff

--- a/plugin/Feed/mixi/new_diary.rb
+++ b/plugin/Feed/mixi/new_diary.rb
@@ -24,10 +24,19 @@ def new_diary(config,data)
2424 data = []
2525 diarylist = client.get('http://mixi.jp/new_friend_diary.pl')
2626 sleep 5
27- diarylist.links.each do |link|
28- diaryurl = link.href # => 'view_diary.pl?id=12345&owner_id=2345'
29- if /view_diary.pl\?id\=/ =~ diaryurl then
30- data << 'http://mixi.jp/' + diaryurl
27+ loop do
28+ diarylist.links.each do |link|
29+ diaryurl = link.href # => 'view_diary.pl?id=12345&owner_id=2345'
30+ if /view_diary.pl\?id\=/ =~ diaryurl then
31+ data << 'http://mixi.jp/' + diaryurl
32+ end
33+ end
34+ nextlink = diarylist.links.find(){|i| i.href =~ /new_friend_diary\.pl\?page\=\d\&direction\=next/ }
35+ if(nextlink != nil)
36+ diarylist = nextlink.click
37+ sleep 5
38+ else
39+ break
3140 end
3241 end
3342 return data