Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
A
Appium-crawl
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李康
Appium-crawl
Commits
556349b6
Commit
556349b6
authored
Oct 27, 2019
by
李康
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some fix
parent
84836ca8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
20 deletions
+51
-20
all.txt
all.txt
+28
-0
brands.py
brands.py
+23
-20
No files found.
done
.txt
→
all
.txt
View file @
556349b6
BEAUTY BUFFET
Catrice
CosMedix
Ego QV
Freeze Frame
HABA
HOLD LIVE
Kosmea
MILANI COSMETICS
Make Up Academy
NYX
...
...
@@ -9,22 +13,29 @@ OBAGI
Omorovicza
PHYSICIANS FORMULA
SK-II
SNAIL WHITE
Sesderma
Swisse
THANN
The Ordinary
Timeless
Topix
VNK
W.LAB
ZELENS
e.l.f.
ele
essence
kiko
make up revolution
后
乐敦
伊思
伊索
优佳
伯特
佳雪
依云
依泉
倩丽
倩碧
...
...
@@ -54,6 +65,7 @@ make up revolution
梦妆
森田
橘朵
欧树
洛克
爱敬
玉泽
...
...
@@ -65,8 +77,10 @@ make up revolution
羽西
肌研
至本
芮一
芮谜
芳珂
苏芊
薇姿
蜜浓
谜尚
...
...
@@ -84,8 +98,10 @@ make up revolution
汤姆·福特
三熹玉
丝塔芙
丝芙兰
丽得姿
九朵云
伊芙兰
优色林
佑天兰
佰草集
...
...
@@ -97,15 +113,18 @@ make up revolution
博倩叶
卡姿兰
卡尼尔
卢卡斯
可复美
圣罗兰
奥碧虹
妙巴黎
妮维雅
娇韵诗
娜迪奥
娥佩兰
孔凤春
孩儿面
安多可
安热沙
希思黎
思亲肤
...
...
@@ -122,6 +141,7 @@ make up revolution
法儿曼
津尔氏
湿又野
澳佳宝
火烈鸟
爱和纯
爱神菲
...
...
@@ -129,6 +149,7 @@ make up revolution
珀莱雅
理肤泉
百雀羚
碧欧泉
科颜氏
稚优泉
纪梵希
...
...
@@ -138,9 +159,11 @@ make up revolution
自然堂
艾惟诺
艾诺碧
芭乐雅
芭妮兰
芯丝翠
苏菲娜
茱莉蔻
茵芙莎
莱珀妮
菊正宗
...
...
@@ -152,6 +175,7 @@ make up revolution
蜜葳特
蝶翠诗
诗佩妮
贝佳斯
贝德玛
贝玲妃
资生堂
...
...
@@ -160,6 +184,7 @@ make up revolution
达尔肤
适乐肤
郁美净
阿玛尼
隆力奇
雅诗敦
雪肌精
...
...
@@ -177,6 +202,8 @@ make up revolution
卡奇色彩
名创优品
城野医生
安娜柏林
安娜贝拉
完美日记
宝拉珍选
宠爱之名
...
...
@@ -194,6 +221,7 @@ make up revolution
玛丽黛佳
玛蒂德肤
相宜本草
美体小铺
美康粉黛
美迪惠尔
肌肤之钥
...
...
brands.py
View file @
556349b6
...
...
@@ -9,26 +9,29 @@ def cropImg(img, out, bounds):
cropped
=
img
[
int
(
bounds
[
'top'
]):
int
(
bounds
[
'bottom'
]),
int
(
bounds
[
'left'
]):
int
(
bounds
[
'right'
])]
# 裁剪坐标为[y0:y1, x0:x1]
cv2
.
imwrite
(
out
,
cropped
)
def
getBrandDetail
(
brand
,
done
):
def
getBrandDetail
(
brand
,
done
,
en
=
0
):
all_texts
=
brand
.
sibling
(
className
=
"android.widget.TextView"
)
name
=
all_texts
[
0
]
.
get_text
()
if
name
not
in
done
:
res
=
[]
for
text
in
all_texts
:
st
=
text
.
get_text
()
if
st
in
[
"进入品牌"
,
""
]:
continue
elif
st
.
startswith
(
"代表单品"
):
continue
else
:
res
.
append
(
st
)
if
len
(
res
)
in
[
3
,
4
]:
if
len
(
res
)
==
3
:
res
=
[
res
[
0
]]
+
res
done
.
append
(
name
)
return
res
else
:
res
=
[]
for
text
in
all_texts
:
st
=
text
.
get_text
()
if
st
in
done
:
return
None
if
st
in
[
"进入品牌"
,
""
]:
continue
elif
st
.
startswith
(
"代表单品"
):
continue
else
:
res
.
append
(
st
)
if
len
(
res
)
in
[
3
,
4
]:
done
.
append
(
res
[
0
])
if
len
(
res
)
==
3
:
if
en
==
0
:
res
.
index
(
1
,
""
)
else
:
res
.
index
(
0
,
""
)
return
res
else
:
return
None
def
getBrandImg
(
d
,
name
):
elems
=
d
(
className
=
"android.support.v7.widget.RecyclerView"
)
.
child
(
className
=
"android.widget.RelativeLayout"
)
...
...
@@ -103,7 +106,7 @@ def getEnglishBrands():
brand
=
temp
break
res
=
getBrandDetail
(
brand
,
done
)
res
=
getBrandDetail
(
brand
,
done
,
1
)
if
res
is
not
None
:
print
(
delim
.
join
(
res
))
f
.
write
(
delim
.
join
(
res
)
+
"
\n
"
)
...
...
@@ -116,7 +119,7 @@ def getEnglishBrands():
d
.
swipe_ext
(
"up"
,
scale
=
0.2
)
brands
=
d
(
className
=
"android.support.v7.widget.RecyclerView"
)
.
child
(
resourceId
=
"org.c2h4.afei.beauty:id/tv_name"
)
for
idx
in
range
(
1
,
brands
.
count
):
res
=
getBrandDetail
(
brands
[
idx
],
done
)
res
=
getBrandDetail
(
brands
[
idx
],
done
,
1
)
if
res
is
not
None
:
f
.
writelines
(
delim
.
join
(
res
))
print
(
delim
.
join
(
res
)
+
"
\n
"
)
...
...
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