code: def run(self):
          
          try:
              answer = urlopen(self.url + "&mode=queue").read().decode()
          except (HTTPError, URLError) as error:
              self.output = {
                  "full_text": str(error.reason),
                  "color": "#FF0000"
              }
              return
  
          answer = json.loads(answer)
  
          # if answer["status"] exists and is False, an error occured
          if not answer.get("status", True):
              self.output = {
                  "full_text": answer["error"],
                  "color": "#FF0000"
              }
              return
  
          queue = answer["queue"]
          self.status = queue["status"]
  
          if self.is_paused():
              color = self.color_paused
          elif self.is_downloading():
              color = self.color_downloading
          else:
              color = self.color
  
          if self.is_downloading():
              full_text = self.format.format(**queue)
          else:
              full_text = self.format_paused.format(**queue)
  
          self.output = {
              "full_text": full_text,
              "color": color
          }
docs: Connect to SABnzbd and get the data.