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
3f908459
Commit
3f908459
authored
Oct 18, 2019
by
李康
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support starting brand sub-type
parent
9b1d700d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
1 deletion
+17
-1
product.py
product.py
+17
-1
No files found.
product.py
View file @
3f908459
...
@@ -292,6 +292,10 @@ def getProductByType(argv):
...
@@ -292,6 +292,10 @@ def getProductByType(argv):
if
not
os
.
path
.
exists
(
brand_name
):
if
not
os
.
path
.
exists
(
brand_name
):
os
.
makedirs
(
brand_name
)
os
.
makedirs
(
brand_name
)
starting_brand_name
=
None
if
len
(
argv
)
==
3
:
starting_brand_name
=
argv
[
2
]
d
=
u2
.
connect_usb
(
'd52196830204'
)
d
=
u2
.
connect_usb
(
'd52196830204'
)
print
(
d
.
app_current
())
print
(
d
.
app_current
())
d
.
freeze_rotation
()
d
.
freeze_rotation
()
...
@@ -305,7 +309,19 @@ def getProductByType(argv):
...
@@ -305,7 +309,19 @@ def getProductByType(argv):
scraped_cnt
=
0
scraped_cnt
=
0
with
open
(
brand_name
+
"/products.csv"
,
'a+'
)
as
f
:
with
open
(
brand_name
+
"/products.csv"
,
'a+'
)
as
f
:
ftype_names
=
getAllFilterTypes
(
d
)
temp_types
=
getAllFilterTypes
(
d
)
ftype_names
=
[]
if
starting_brand_name
is
not
None
:
starting_flag
=
False
for
temp_type
in
temp_types
:
if
starting_flag
:
ftype_names
.
append
(
temp_type
)
elif
temp_type
==
starting_brand_name
:
ftype_names
.
append
(
temp_type
)
starting_flag
=
True
else
:
ftype_names
=
temp_types
print
(
"All the brand sub-types:"
)
print
(
"All the brand sub-types:"
)
for
ftype_name
in
ftype_names
:
for
ftype_name
in
ftype_names
:
print
(
ftype_name
)
print
(
ftype_name
)
...
...
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