Skip to content
Browse files

Merge branch 'master' of github.com:njh/dbpedialite

  • Loading branch information...
2 parents 28d46b7 + c4c7f27 commit e42098b5bfc74efb13b1f00c05c9fafc4c57b8a2 @njh committed
Showing with 1 addition and 21 deletions.
  1. +1 −21 scripts/daily_ping.rb
View
22 scripts/daily_ping.rb
@@ -2,8 +2,7 @@
#
# This script fetches the Wikipedia english front page
# scans it for links to articles, looks each of them up,
-# and submits the dbpedialite.org URI for them to Sindice
-# and Ping The Semantic Web.
+# and submits the dbpedialite.org URI for them to Sindice.
#
$:.unshift File.join(File.dirname(__FILE__), '..', 'lib')
@@ -60,24 +59,6 @@ def ping_sindice(data)
end
end
-def ping_the_semantic_web(ping_url)
- uri = URI.parse("http://pingthesemanticweb.com/rest/?url=#{URI.escape(ping_url)}")
- begin
- res = Net::HTTP.start(uri.host, uri.port) do |http|
- http.read_timeout = HTTP_TIMEOUT
- http.open_timeout = HTTP_TIMEOUT
- http.get(uri.request_uri)
- end
- if res.code == '200' and res.body =~ /Thanks for pinging/
- puts " => Ping OK"
- else
- raise res.body
- end
- rescue Exception => e
- $stderr.puts "Failed to ping the semantic web: #{e}"
- end
-end
-
rdf_urls = []
@@ -90,7 +71,6 @@ def ping_the_semantic_web(ping_url)
#lastmod = Time.parse(info['touched'])
if info['ns'] == 0
rdf_url = "http://dbpedialite.org/things/#{info['pageid']}.rdf"
- ping_the_semantic_web(rdf_url)
rdf_urls << rdf_url
end
rescue MediaWikiApi::NotFound

0 comments on commit e42098b

Please sign in to comment.
Something went wrong with that request. Please try again.