(self, url, query)
Wrapper for GET queries
Wrapper for GET queries
Wrapper for GET queries
def download_sample(self, url, query):
        """
        Wrapper for GET queries
        """
        try:
            r = requests.get(
                url,
                headers={"User-Agent": self.ua},
                data=query,
            )
            if r.ok:
                try:
                    return r.content
                except:
                    raise UrlHausError()
            else:
                return None
        except Exception as e:
            raise UrlHausError(e)
def download_sample ( self , url , query ) : try : r = requests . get ( url , headers = { "User-Agent" : self . ua } , data = query , ) if r . ok : try : return r . content except : raise UrlHausError ( ) else : return None except Exception as e : raise UrlHausError ( e )