diff --git a/instagram/bind.py b/instagram/bind.py index 17c47775..cce758bf 100644 --- a/instagram/bind.py +++ b/instagram/bind.py @@ -53,6 +53,7 @@ class InstagramAPIMethod(object): response_type = config.get("response_type", "list") include_secret = config.get("include_secret", False) objectify_response = config.get("objectify_response", True) + exclude_format = config.get('exclude_format', False) def __init__(self, api, *args, **kwargs): self.api = api @@ -101,7 +102,7 @@ def _build_path(self): self.path = self.path.replace(variable, value) - if self.api.format: + if self.api.format and not self.exclude_format: self.path = self.path + '.%s' % self.api.format def _build_pagination_info(self, content_obj): diff --git a/instagram/client.py b/instagram/client.py index 65ff7d21..e9ffc268 100644 --- a/instagram/client.py +++ b/instagram/client.py @@ -42,7 +42,8 @@ def __init__(self, *args, **kwargs): path="/media/shortcode/{shortcode}", accepts_parameters=['shortcode'], response_type="entry", - root_class=MediaShortcode) + root_class=MediaShortcode, + exclude_format=True) media_likes = bind_method(