Commit c480e103 authored by soheib's avatar soheib
Browse files

fix bug on getting comments form python code

parent ec32c735
......@@ -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 ...')
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment