| 99 | # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| 100 | # get capabilities via HTTP |
| 101 | def http(self, host): |
| 102 | try: |
| 103 | # poor man's way get http title |
| 104 | sys.stdout.write("Checking for HTTP support: ") |
| 105 | html = requests.get("http://" + host).text |
| 106 | # cause we are to parsimonious to import BeautifulSoup ;) |
| 107 | title = re.findall("<title.*?>\n?(.+?)\n?</title>", |
| 108 | html, re.I | re.M | re.S) |
| 109 | # get name of device |
| 110 | model = item(title) |
| 111 | # get language support |
| 112 | self.set_support(model) |
| 113 | output().green("found") |
| 114 | except Exception as e: |
| 115 | output().errmsg("not found", e) |
| 116 | |
| 117 | # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| 118 | # get capabilities via HTTPS |