aboutsummaryrefslogtreecommitdiff
path: root/scripts/website-check.rb
diff options
context:
space:
mode:
authorBradley Taunt <bt@btxx.org>2024-01-22 13:06:19 -0500
committerBradley Taunt <bt@btxx.org>2024-01-22 13:06:19 -0500
commitd2e4da10c806d815eded44ade076babb78802c16 (patch)
tree7494261e22f3255926204164449c7345f5b500e5 /scripts/website-check.rb
Initial commit to new cgit platform
Diffstat (limited to 'scripts/website-check.rb')
-rw-r--r--scripts/website-check.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/scripts/website-check.rb b/scripts/website-check.rb
new file mode 100644
index 0000000..48adab5
--- /dev/null
+++ b/scripts/website-check.rb
@@ -0,0 +1,20 @@
+require 'httparty'
+require 'nokogiri'
+
+HTTParty::Basement.default_options.update(verify: false)
+
+response = HTTParty.get('https://1mb.club')
+
+document = Nokogiri::HTML(response.body)
+website_urls = document.css("#container tr")
+
+puts "Scanning website members URLs..."
+website_urls.each do |single_site|
+ begin
+ url = single_site.css("a.site").first.attribute("href").value
+ response = HTTParty.get(url, timeout: 4)
+ puts "Checking: " + url
+ rescue Exception
+ puts "<!-------- ERROR: " + url
+ end
+end