How to access self-hosted StackOverflow with StackAPI for Python

283 Views Asked by At

Is it possible to specify a self-hosted url?

from stackapi import StackAPI, StackAPIError
try:
    SITE = StackAPI('stackoverflow.selfhosted-enterprise.com', proxy=proxies)
except StackAPIError as e:
    print(e.message)

ValueError: Invalid Site Name provided

According to https://stackapi.readthedocs.io/en/latest/api.html the name must be one of the sites on the Stack Exchange Network. Also according to https://github.com/AWegnerGitHub/stackapi/blob/master/stackapi/stackapi.py#L70 it does not seem to allow for arbitrary urls, to cover the self-hosted / enterprise use case.

Is it possible to override it, or is there any other alternative for self-hosted / enterprise?

0

There are 0 best solutions below