Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
students
search-page
Commits
7f828863
Commit
7f828863
authored
Jan 24, 2021
by
Lee SeoYeon
Browse files
.
parent
8bd19e51
Changes
1
Hide whitespace changes
Inline
Side-by-side
server/controllers/review.controller.js
View file @
7f828863
import
Review
from
'
../models/Review.js
'
import
cheerio
from
"
cheerio
"
;
import
cheerio
from
"
cheerio
"
;
//크롤링
import
fs
from
'
fs
'
import
axios
from
'
axios
'
;
...
...
@@ -9,7 +9,7 @@ import axios from 'axios';
const
search
=
async
(
req
,
res
,
next
)
=>
{
//**************************구글 크롤링 할 때************************/
try
{
let
reviews
=
[]
let
reviews
=
[]
let
content
=
[]
const
url
=
"
https://www.google.com/search?q=
"
+
encodeURI
(
req
.
params
.
search
)
+
"
+site%3Atistory.com&page_no=1
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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