Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- state : NY
- county : New York County
- #state is the initials of your state
- #county is the full name of your county, including the word "county"
- command /print:
- trigger:
- $ thread
- set {_warning} to text from url "http://www.nws.noaa.gov/view/prodsByState.php?state={@state}&prodtype=warnings##SVRCAE"
- set {_comparison} to {_warning}
- set {_irreleventText.beginning} to first index of "<pre>" in {_warning}
- set {_first} to the first {_irreleventText.beginning} characters of {_warning}
- replace all {_first} in {_comparison} with ""
- set {_irreleventText.end} to first index of "</pre>" in {_comparison}
- set {_comparison} to the first {_irreleventText.end} characters of {_comparison}
- replace all {_last} in {_comparison} with ""
- if {_comparison} contains "Warning":
- if {_comparison} contains "{@county}":
- broadcast "<light red>YES"
- else:
- message "<light green>NO"
- else if {_warning} is null:
- message "<red>404 Error, check URL."
- else:
- message "<light green>NO"
- #message "%{_comparison}%" to the console
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement