neingeist
/
neinomaten
Archived
1
0
Fork 0

rausgekratztes html unescapen

master
neingeist 19 years ago
parent 20823077c6
commit d75a197ac5

@ -2,10 +2,9 @@
module MediaWikiBot
require 'http-access2'
require 'cgi'
require 'erb'
require 'parsedate'
include ParseDate
require 'http-access2'
class WikiBot
@ -84,7 +83,7 @@ class WikiBot
allpages_page = @client.get_content(@wiki + "Special:Allpages")
allpages_page.scan(/title="(.*?)"/) do |m|
title = m[0]
title = CGI.unescapeHTML(m[0])
allpages.push(title)
end
@ -103,7 +102,7 @@ class WikiBot
what_links_here_page = @client.get_content(url_what_links_here(title))
what_links_here_page.scan(/<li><a href=".*?" title="(.*?)"/) do |m|
title = m[0]
title = CGI.unescapeHTML(m[0])
what_links_here.push(title)
end
@ -188,7 +187,7 @@ class WikiBot
category_page = @client.get_content(@wiki + url_encode(category))
category_page.scan(/<li><a href=".*?" title="(.*?)"/) do |m|
title = m[0]
title = CGI.unescapeHTML(m[0])
articles.push(title)
end