diff --git a/README.md b/README.md index a5fc9fc..1fd2f8f 100644 --- a/README.md +++ b/README.md @@ -4,16 +4,15 @@ A simple way to access the [Webhose.io](https://webhose.io) API from your Python ```python import webhoseio - + webhoseio.config(token=YOUR_API_KEY) output = webhoseio.query("filterWebContent", {"q":"github"}) - print output['posts'][0]['text'] # Print the text of the first post - print output['posts'][0]['published'] # Print the text of the first post publication date + print(output['posts'][0]['text']) # Print the text of the first post + print(output['posts'][0]['published']) # Print the text of the first post publication date # Get the next batch of posts output = webhoseio.get_next() - print output['posts'][0]['thread']['site'] # Print the site of the first post - + print(output['posts'][0]['thread']['site']) # Print the site of the first post ``` diff --git a/webhoseio/__init__.py b/webhoseio/__init__.py index 0fdb3fc..b3c006d 100644 --- a/webhoseio/__init__.py +++ b/webhoseio/__init__.py @@ -13,8 +13,8 @@ def query(self, end_point_str, param_dict=None): if param_dict is not None: param_dict.update({"token": self.token}) param_dict.update({"format": "json"}) - - response = self.session.get("http://webhose.io/" + end_point_str, params=param_dict) + + response = self.session.get("https://webhose.io/" + end_point_str, params=param_dict) if response.status_code != 200: raise Exception(response.text)