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
c480e103
Commit
c480e103
authored
Aug 22, 2021
by
soheib
Browse files
fix bug on getting comments form python code
parent
ec32c735
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/instagram/instagram.service.ts
View file @
c480e103
...
...
@@ -60,8 +60,8 @@ export class InstagramService implements OnApplicationBootstrap {
async
getLikesFromInstaLoader
(
username
:
string
,
password
:
string
,
post_short_code
:
string
,
profile
:
string
)
{
console
.
log
(
'
start getting likes
'
);
let
paths
=
path
.
resolve
(
"
src
"
,
"
instagram
"
,
"
instaloader-service
"
,
"
getLikes.py
"
)
console
.
log
(
`
${
paths
}
`
,
`
${
username
}
`
,
`
${
password
}
`
,
`
${
post_short_code
}
`
,
`
${
profile
}
`
);
const
getLikesProccess
=
spawn
(
'
python3
'
,
[
`
${
paths
}
`
,
`
${
username
}
`
,
`
${
password
}
`
,
`
${
post_short_code
}
`
,
`
${
profile
}
`
,])
getLikesProccess
.
stdout
.
on
(
'
data
'
,
function
(
data
)
{
...
...
@@ -80,10 +80,11 @@ export class InstagramService implements OnApplicationBootstrap {
}
async
getCommentsFromInstaLoader
(
username
:
string
,
password
:
string
,
post_short_code
:
string
,
profile
:
string
)
{
console
.
log
(
"
start getting comments
"
);
let
paths
=
path
.
resolve
(
"
src
"
,
"
instagram
"
,
"
instaloader-service
"
,
"
getComments.py
"
)
console
.
log
(
paths
);
const
getCommentsProccess
=
spawn
(
'
python3
'
,
[
`
'
${
paths
}
`
,
`
${
username
}
`
,
`
${
password
}
`
,
`
${
post_short_code
}
`
,
`
${
profile
}
`
])
console
.
log
(
`
${
paths
}
`
,
`
${
username
}
`
,
`
${
password
}
`
,
`
${
post_short_code
}
`
,
`
${
profile
}
`
);
const
getCommentsProccess
=
spawn
(
'
python3
'
,
[
`
${
paths
}
`
,
`
${
username
}
`
,
`
${
password
}
`
,
`
${
post_short_code
}
`
,
`
${
profile
}
`
])
getCommentsProccess
.
stdout
.
on
(
'
data
'
,
function
(
data
)
{
console
.
log
(
'
start collecting comments from python script ...
'
)
...
...
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