Created
March 30, 2023 15:38
-
-
Save njh/73647287e0c248814305a25163459045 to your computer and use it in GitHub Desktop.
RadioDNS test for Radioplayer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'radiodns' | |
require 'uri' | |
puts "Looking up FQDN for Wycombe Sound 106.6" | |
params = { | |
:freq => '10660', | |
:pi => 'c0a6', | |
:ecc => 'ce1', | |
:bearer => 'fm' | |
} | |
service = RadioDNS::Resolver.resolve(params) | |
puts "=> #{service.cname}" | |
puts "Lookup up server for RadioEPG" | |
radioepg = service.radioepg | |
puts "=> #{radioepg.host}:#{radioepg.port}" | |
puts "Calcularing URI for Service Information" | |
uri = URI.parse("http://#{radioepg.host}:#{radioepg.port}/radiodns/spi/3.1/SI.xml") | |
puts "=> #{uri}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment