Toggle navigation
Toggle navigation
This project
Loading...
Sign in
강상위
/
my-broadcasting
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
김승훈
2018-12-11 19:48:32 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
7fed4813169cca5f395ec87ce9fca4c1f0f16f26
7fed4813
1 parent
7998b82c
동일인물검색 업데이트
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
31 deletions
selenium-function/동명이인/sdfasdfasd.js → selenium-function/동명이인/same_name_search.js
selenium-function/동명이인/s
dfasdfasd
.js
→
selenium-function/동명이인/s
ame_name_search
.js
View file @
7fed481
...
...
@@ -20,41 +20,57 @@ var driver = new webdriver.Builder()
.
setChromeOptions
(
Options
)
.
build
();
var
First_Search
=
function
(
name
)
{
var
self
=
this
;
this
.
on
(
'input'
,
function
()
{
if
(
fs
.
existsSync
(
"./log/"
+
name
+
"_next_link.txt"
))
{
const
next_link
=
fs
.
readFileSync
(
"./log/"
+
name
+
"_next_link.txt"
);
const
img_src
=
fs
.
readFileSync
(
"./log/"
+
name
+
"_img_src.txt"
);
next_link_Array
=
next_link
.
toString
().
split
(
','
);
img_src_Array
=
img_src
.
toString
().
split
(
','
);
driver
.
quit
()
console
.
log
(
next_link_Array
)
console
.
log
(
img_src_Array
)
setTimeout
(
function
()
{
br_search
.
emit
(
'click'
)
},
1000
)
}
else
{
test1
.
first_search
(
driver
,
name
,
function
()
{
var
result_arr
=
[]
module
.
exports
=
{
First_Search
:
function
(
name
)
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
if
(
fs
.
existsSync
(
"./log/"
+
name
+
"_next_link.txt"
))
{
const
next_link
=
fs
.
readFileSync
(
"./log/"
+
name
+
"_next_link.txt"
);
const
img_src
=
fs
.
readFileSync
(
"./log/"
+
name
+
"_img_src.txt"
);
next_link_Array
=
next_link
.
toString
().
split
(
','
);
img_src_Array
=
img_src
.
toString
().
split
(
','
);
br_search
=
new
broadcasting_search
(
next_link_Array
,
"유재석"
,
0
)
driver
.
quit
()
result_arr
.
push
(
next_link_Array
)
result_arr
.
push
(
img_src_Array
)
console
.
log
(
next_link_Array
)
console
.
log
(
img_src_Array
)
driver
.
quit
()
setTimeout
(
function
()
{
br_search
.
emit
(
'click'
)
},
1000
)
})
}
})
console
.
log
(
result_arr
)
return
result_arr
}
else
{
test1
.
first_search
(
driver
,
name
,
function
()
{
const
next_link
=
fs
.
readFileSync
(
"./log/"
+
name
+
"_next_link.txt"
);
const
img_src
=
fs
.
readFileSync
(
"./log/"
+
name
+
"_img_src.txt"
);
next_link_Array
=
next_link
.
toString
().
split
(
','
);
img_src_Array
=
img_src
.
toString
().
split
(
','
);
br_search
=
new
broadcasting_search
(
next_link_Array
,
"유재석"
,
0
)
result_arr
.
push
(
next_link_Array
)
result_arr
.
push
(
img_src_Array
)
console
.
log
(
next_link_Array
)
console
.
log
(
img_src_Array
)
driver
.
quit
()
return
result_arr
})
}
})
}
//util.inherits(First_Search,EventEmitter);
//first_search1 = new First_Search("유재석")
//first_search1.emit('input')
}
util
.
inherits
(
First_Search
,
EventEmitter
);
first_search1
=
new
First_Search
(
"유재석"
)
first_search1
.
emit
(
'input'
)
//다른 파일에서 호출하는 방법
//var a=require("./sane_name_search")
//var arr = []
//a.First_Search("(검색어 입력)").then(aa => {
// arr=a
// console.log(arr)
//})
...
...
Please
register
or
login
to post a comment