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