Skip to content

Commit 1900740

Browse files
author
Jon Heaton
committed
Merge branch 'master' of https://github.com/Crowdbooster/python-instagram into Crowdbooster-master
2 parents 508a5e9 + 580e55f commit 1900740

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

instagram/bind.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ class InstagramAPIMethod(object):
5353
response_type = config.get("response_type", "list")
5454
include_secret = config.get("include_secret", False)
5555
objectify_response = config.get("objectify_response", True)
56+
exclude_format = config.get('exclude_format', False)
5657

5758
def __init__(self, api, *args, **kwargs):
5859
self.api = api
@@ -101,7 +102,7 @@ def _build_path(self):
101102

102103
self.path = self.path.replace(variable, value)
103104

104-
if self.api.format:
105+
if self.api.format and not self.exclude_format:
105106
self.path = self.path + '.%s' % self.api.format
106107

107108
def _build_pagination_info(self, content_obj):

instagram/client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ def __init__(self, *args, **kwargs):
4242
path="/media/shortcode/{shortcode}",
4343
accepts_parameters=['shortcode'],
4444
response_type="entry",
45-
root_class=MediaShortcode)
45+
root_class=MediaShortcode,
46+
exclude_format=True)
4647

4748

4849
media_likes = bind_method(

0 commit comments

Comments
 (0)