Created
February 6, 2014 00:15
-
-
Save BrianEnigma/8836066 to your computer and use it in GitHub Desktop.
Grab and locally cache comments from multiple WordPress blogs
This file contains 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
#!/usr/bin/ruby | |
URL_LIST = [ | |
'site1', 'http://example.com/comments/feed/', | |
'site2', 'http://example.com/comments/feed/', | |
'site3', 'http://example.com/comments/feed/', | |
] | |
position = 0 | |
while position < URL_LIST.length | |
name = URL_LIST[position] | |
link = URL_LIST[position + 1] | |
cmd = "wget -q -O #{name}.xml '#{link}'" | |
system(cmd) | |
position += 2 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment