Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
shahriar
instagram-service
Commits
1243dcd5
Commit
1243dcd5
authored
Aug 28, 2021
by
soheib
Browse files
update instaloader service
parent
8996fb7f
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/instagram/instaloader-service/getComments.py
View file @
1243dcd5
...
@@ -77,7 +77,7 @@ def getComments(db, post, profile):
...
@@ -77,7 +77,7 @@ def getComments(db, post, profile):
user_id
=
found_username
[
'_id'
]
user_id
=
found_username
[
'_id'
]
else
:
else
:
created_user
=
account_col
.
insert_one
({
"username"
:
comment
.
owner
.
username
,
created_user
=
account_col
.
insert_one
({
"username"
:
comment
.
owner
.
username
,
"instagram_user_id"
:
comment
.
owner
.
userid
,
"is_follower"
:
f
alse
})
"instagram_user_id"
:
comment
.
owner
.
userid
,
"is_follower"
:
F
alse
})
user_id
=
created_user
.
inserted_id
user_id
=
created_user
.
inserted_id
print
(
comment
.
owner
.
username
,
'added to users'
)
print
(
comment
.
owner
.
username
,
'added to users'
)
...
...
src/instagram/instaloader-service/getLikes.py
View file @
1243dcd5
...
@@ -80,7 +80,7 @@ def getLikes(db, post, profile):
...
@@ -80,7 +80,7 @@ def getLikes(db, post, profile):
user_id
=
found_username
[
'_id'
]
user_id
=
found_username
[
'_id'
]
else
:
else
:
created_user
=
account_col
.
insert_one
(
created_user
=
account_col
.
insert_one
(
{
"username"
:
like
.
username
,
"is_follower"
:
f
alse
})
{
"username"
:
like
.
username
,
"is_follower"
:
F
alse
})
user_id
=
created_user
.
inserted_id
user_id
=
created_user
.
inserted_id
print
(
like
.
username
,
'added to users'
)
print
(
like
.
username
,
'added to users'
)
temp
=
{
"user_id"
:
user_id
,
temp
=
{
"user_id"
:
user_id
,
...
@@ -88,8 +88,8 @@ def getLikes(db, post, profile):
...
@@ -88,8 +88,8 @@ def getLikes(db, post, profile):
x
=
col
.
update
(
temp
,
temp
,
upsert
=
True
)
x
=
col
.
update
(
temp
,
temp
,
upsert
=
True
)
print
(
like
.
username
,
" like post : "
,
post_short_code
)
print
(
like
.
username
,
" like post : "
,
post_short_code
)
except
:
except
err
:
print
(
"Error"
)
print
(
err
)
__main__
()
__main__
()
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment