(self, url, key, query)
Wrapper for POST queries
Wrapper for POST queries
Wrapper for POST queries
def launch_post_query(self, url, key, query):
        """
        Wrapper for POST queries
        """
        try:
            r = requests.post(
                url,
                headers={"User-Agent": self.ua},
                data={key: query},
            )
            if r.ok:
                return r.json()
            else:
                raise UrlHausError()
        except Exception as e:
            raise UrlHausError(e)
def launch_post_query ( self , url , key , query ) : try : r = requests . post ( url , headers = { "User-Agent" : self . ua } , data = { key : query } , ) if r . ok : return r . json ( ) else : raise UrlHausError ( ) except Exception as e : raise UrlHausError ( e )