username detection

This commit is contained in:
Christian Mehlmauer
2013-02-05 09:54:32 +01:00
parent 3524685cf2
commit 54e2c4de3c

View File

@@ -42,7 +42,8 @@ module WpUsernames
# Get the real name from the redirect site # Get the real name from the redirect site
nickname = get_nickname_from_url(url) nickname = get_nickname_from_url(url)
elsif response.code == 200 # username in body? elsif response.code == 200 # username in body?
username = response.body[%r{posts by (.*) feed}i, 1] # get the username from the author feed URL
username = response.body[%r{/author/([^/\b]+)/?}i, 1]
nickname = get_nickname_from_response(response) nickname = get_nickname_from_response(response)
end end