Skip to content

Commit

Permalink
fix: setting target
Browse files Browse the repository at this point in the history
  • Loading branch information
Datalux committed Mar 27, 2021
1 parent 8bd1abc commit 9082990
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/Osintgram.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ def get_hashtags(self):

def get_user_info(self):
try:
endpoint = 'users/{user_id!s}/full_detail_info/'.format(**{'user_id': self.target})
endpoint = 'users/{user_id!s}/full_detail_info/'.format(**{'user_id': self.target_id})
content = self.api._call_api(endpoint)

data = content['user_detail']['user']
Expand Down Expand Up @@ -874,7 +874,7 @@ def get_user_photo(self):
def get_user_propic(self):

try:
endpoint = 'users/{user_id!s}/full_detail_info/'.format(**{'user_id': self.target})
endpoint = 'users/{user_id!s}/full_detail_info/'.format(**{'user_id': self.target_id})
content = self.api._call_api(endpoint)

data = content['user_detail']['user']
Expand Down Expand Up @@ -1004,18 +1004,16 @@ def get_people_tagged_by_user(self):

def get_user(self, username):
try:
endpoint = 'users/{user_id!s}/full_detail_info/'.format(**{'user_id': self.target})
content = self.api._call_api(endpoint)

content = self.api.username_info(username)
if self.writeFile:
file_name = "output/" + self.target + "_user_id.txt"
file = open(file_name, "w")
file.write(str(content['user_detail']['user']['pk']))
file.write(str(content['user']['pk']))
file.close()

user = dict()
user['id'] = content['user_detail']['user']['pk']
user['is_private'] = content['user_detail']['user']['is_private']
user['id'] = content['user']['pk']
user['is_private'] = content['user']['is_private']

return user
except ClientError as e:
Expand Down

0 comments on commit 9082990

Please sign in to comment.