Skip to content
This repository has been archived by the owner on Jun 9, 2024. It is now read-only.

Commit

Permalink
Fixed conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
IORoot committed Aug 4, 2020
2 parents 97b3066 + 645206d commit f043c5f
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/api/instagram.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ export class Instagram<PostType> {
this.sleepTime = options.sleepTime;
this.hibernationTime = options.hibernationTime;
this.fullAPI = options.fullAPI;
this.proxyURL = options.proxyURL;
this.proxyURL = 'ioroot:8888';
this.executablePath = options.executablePath;
this.validator = options.validator || validator;

Expand Down Expand Up @@ -657,10 +657,11 @@ export class Instagram<PostType> {
let parsed;
try {
await postPage.goto(this.postURL + post + "/");

if (this.screenshots){
await this.page.screenshot({path: '/tmp/instamancer/05_Post_' + post + '.png'});
}

} catch (error) {
await this.handlePostPageError(
postPage,
Expand Down Expand Up @@ -1002,14 +1003,16 @@ export class Instagram<PostType> {
await this.page.waitFor(100);
await this.page.click('button[type="submit"]');
await this.page.waitFor(3000);

if (this.screenshots){
await this.page.screenshot({path: '/tmp/instamancer/01_login.png'});
}

// Save Details Button
await this.page.waitForSelector('button[type="button"]');
await this.page.click('button[type="button"]');
await this.page.waitFor(500);

if (this.screenshots){
await this.page.screenshot({path: '/tmp/instamancer/02_SaveDetails.png'});
}
Expand All @@ -1019,13 +1022,15 @@ export class Instagram<PostType> {
if (this.screenshots){
await this.page.screenshot({path: '/tmp/instamancer/03_GotoFirstPage.png'});
}
// await this.page.waitFor(3000);


} catch (error) {
this.logger.info("No LOGIN Screen found.");

if (this.screenshots){
await this.page.screenshot({path: '/tmp/instamancer/04_noLoginScreenFound.png'});
}

}


Expand Down

0 comments on commit f043c5f

Please sign in to comment.