Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3ce796b

Browse files
some changes
1 parent d3e97c6 commit 3ce796b

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

‎web scrapping/dynamic/flipkartdynamic.js‎

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
const Nightmare = require('nightmare')
22
const cheerio = require('cheerio');
3+
const express=require('express');
4+
const app=express();
35
const nightmare = Nightmare({ show: true });
46
const url = 'https://www.flipkart.com/';
57

6-
7-
nightmare
8+
app.get('/flipkart',(req,res)=>{
9+
nightmare
810
.goto(url)
911
.wait('body')
1012
.click('button._2AkmmA._29YdH8')
@@ -19,6 +21,8 @@ nightmare
1921
console.log(err);
2022
});
2123

24+
});
25+
2226
let getData = html => {
2327
data = [];
2428
const $ = cheerio.load(html);
@@ -35,4 +39,8 @@ let getData = html => {
3539
});
3640
});
3741
return data;
38-
}
42+
}
43+
44+
app.listen(3000,()=>{
45+
console.log("app is live at 3000");
46+
});

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /