domain_helper.raise_on(domain)
if not isinstance(software, str) and software is not None:
- raise ValueError(f"software[]='{type(software)}' is not of type 'str'")
+ raise ValueError(f"Parameter software[]='{type(software)}' is not of type 'str'")
+ elif not isinstance(origin, str) and origin is not None:
+ raise ValueError(f"Parameter origin[]='{type(origin)}' is not of type 'str'")
+ elif isinstance(origin, str) and origin == "":
+ raise ValueError("Parameter 'origin' is empty")
if software == "misskey":
logger.debug("Invoking misskey.fetch_peers(%s) ...", domain)
logger.debug("Fetching path='%s' from domain='%s' ...", path, domain)
response = network.fetch_response(
- domain, path,
+ domain,
+ path,
network.web_headers,
(config.get("connection_timeout"), config.get("read_timeout")),
allow_redirects=True
logger.debug("doc[]='%s'", type(doc))
generator = doc.find("meta", {"name" : "generator"})
site_name = doc.find("meta", {"property": "og:site_name"})
- platform = doc.find("meta", {"property": "og:platform"})
+ platform = doc.find("meta", {"property": "og:platform"})
logger.debug("generator[]='%s',site_name[]='%s',platform[]='%s'", type(generator), type(site_name), type(platform))
if isinstance(generator, bs4.element.Tag) and isinstance(generator.get("content"), str):