Would be more correct, in order to only scan the res.body when a 200 is returned, to do:

```ruby
if res.nil? or res.code != 200
    return blog_posts
end

links = res.body.scan(/<link>([^<]+)<\/link>/i) # only search on the body response

if links.nil? or links.empty?
    return blog_posts
end
```