Make the `resource` parameter into use the path portion of the wikipedia URL and ensure it is prefixed with `http://www.wikipedia.org` when building `r`.