Wikipedia:Bots/Requests for approval/zanderhackbot
- The following discussion is an archived debate. Please do not modify it. To request review of this BRFA, please start a new section at WT:BRFA. The result of the discussion was Denied.
Operator: Zanderhack (talk · contribs)
Automatic or Manually assisted: Automatic
Programming language(s): Ruby
Source code available: See below
Function overview: Performs a query to determine whether a wikipedia page exists or not. I need this so I can a hyperlinks to my website that go to real pages.
Links to relevant discussions (where appropriate):
N/A
Edit period(s): One time run
Estimated number of pages affected: no editing. it's just a check to see if a page with a given name exists
Exclusion compliant (Y/N): N
Already has a bot flag (Y/N): N
Function details:
checks to see if a page exists :
puts "http://wiki.riteme.site/w/api.php?action=query&titles=#{link.content.gsub(/ /,'_')}&format=xml"
wiki = Nokogiri::XML(open("http://wiki.riteme.site/w/api.php?action=query&titles=#{link.content.gsub(/ /,'_')}&format=xml", 'UserAgent'=>'Ruby Page Finder by Martin Szyllo, Morango London, martin@morango.co.uk Phone +44 020 7099-8959').read)
w = wiki.xpath('//api/query/pages/page')
if !w.attribute("missing")
puts "<a href='http://wiki.riteme.site/wiki/#{link.content}>#{link.content}</a>"
end
Discussion
[edit]Could you confirm the the User_Agent details are OK please ?
What is the purpose of this bot? βcommand 01:15, 22 February 2010 (UTC)[reply]
There are various APIs that are more appropriate to query for existence than a HTTP page load; see http://www.mediawiki.org/wiki/API:Query_-_Properties#info_.2F_in and http://www.mediawiki.org/wiki/API:Query_-_Lists#allpages_.2F_ap Josh Parris 01:25, 22 February 2010 (UTC)[reply]
Yes , I want to query the names of several thousand geographical points of interest against the wikipedia titles to see if there is an equivalent wikipedia page for each one.
http://wiki.riteme.site/w/api.php?action=query&titles=stone_henge
It is too much work to run this many queries manually (from a browser), I need a robot to run this search thousands of times. Please advise how I should do this please ?
Request Expired. — HELLKNOWZ ▎TALK 11:54, 10 March 2011 (UTC)[reply]
- The above discussion is preserved as an archive of the debate. Please do not modify it. To request review of this BRFA, please start a new section at WT:BRFA.