posted by
tobyaw at 10:58pm on 31/03/2021 under livejournal
There are no comments on this entry. (Reply.)
Entries tagged with livejournal.
What’s this? About four years since I last looked at LiveJournal. Has anything changed while I’ve been away?
#!/usr/bin/env ruby
require 'net/http'
require 'net/https'
require 'open-uri'
friends = Array.new
ARGV.each do |user|
open("http://www.livejournal.com/misc/fdata.bml?user=#{user}").readlines.each do |line|
friends.push line.slice(2..-1).strip if line.match /^>/
end
end
http = Net::HTTP.new('alpha.app.net', 443)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
http.start do |connection|
friends.sort.uniq.each do |friend|
puts friend if connection.head("/#{friend}").code.to_i.eql? 200
end
end
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|---|---|---|---|---|---|
|
1
|
2
|
3
|
||||
|
4
|
5
|
6
|
7
|
8
|
9 |
10
|
|
11
|
12
|
13
|
14
|
15
|
16
|
17
|
|
18
|
19
|
20
|
21
|
22
|
23
|
24
|
|
25
|
26
|
27
|
28
|
29
|
30
|
31
|