Skip to content
This repository has been archived by the owner on Oct 21, 2023. It is now read-only.

Custom path and media comments issues #19

Open
JulesDe opened this issue Feb 3, 2017 · 0 comments
Open

Custom path and media comments issues #19

JulesDe opened this issue Feb 3, 2017 · 0 comments

Comments

@JulesDe
Copy link
Contributor

JulesDe commented Feb 3, 2017

I encountered 2 small issues with this code, easily fixed :

  • for the checkSettings() method :

def checkSettings(self, username): if self.customPath: self.IGDataPath = os.path.join( os.path.join(os.path.dirname(os.path.realpath(__file__)), 'data'), username, '' )

It should be if not self.customPath: otherwise everytime a custom path is given, it gets ignored.

  • for the getMediaComments() method :

return CommentResponse(self.http.request("media/" + str(mediaId) + "/comments/?max_id=" + str(maxid) + "&ig_sig_key_version=" + Constants.SIG_KEY_VERSION)[1])

The rank token parameter is missing, so that it's impossible to get all the comments for one post.
Just like, for example, the getUserFollowers() method, it should be :

return CommentResponse(self.http.request("media/" + str(mediaId) + "/comments/?max_id=" + str(maxid) + "&ig_sig_key_version=" + Constants.SIG_KEY_VERSION+ "&rank_token=" + self.rank_token)[1])

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants