Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
岳巧源
/
python_resolve_data
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
4d47ba28
authored
Aug 28, 2024
by
larosa
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
add script
parent
133f5948
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
chip1stop.py
chip1stop.py
View file @
4d47ba28
...
...
@@ -180,7 +180,7 @@ class DataUtil:
with
open
(
file_path
,
errors
=
'ignore'
)
as
f
:
content_list
=
f
.
readlines
()
for
index
in
range
(
len
(
content_list
)):
if
index
>
10
:
if
index
>
10
0
:
break
if
index
==
0
:
continue
...
...
@@ -238,16 +238,15 @@ class DataUtil:
ladder_prices
[
"price-jpy-6"
]
=
element
if
table
[
"goods_name"
]
==
""
or
table
[
"brand_name"
]
==
""
:
continue
a
=
1
for
k
in
range
(
1
,
7
):
if
"price-break-"
+
str
(
i
)
in
ladder_purchases
\
and
"price-jpy-"
+
str
(
i
)
in
ladder_prices
\
and
is_number
(
ladder_purchases
[
"price-break-"
+
str
(
i
)])
\
and
is_number
(
ladder_prices
[
"price-jpy-"
+
str
(
i
)]):
if
(
"price-break-"
+
str
(
k
)
)
in
ladder_purchases
\
and
(
"price-jpy-"
+
str
(
k
)
)
in
ladder_prices
\
and
is_number
(
ladder_purchases
[
"price-break-"
+
str
(
k
)])
\
and
is_number
(
ladder_prices
[
"price-jpy-"
+
str
(
k
)]):
item
=
dict
()
item
[
"purchases"
]
=
int
(
ladder_purchases
[
"price-break-"
+
str
(
i
)])
item
[
"purchases"
]
=
int
(
ladder_purchases
[
"price-break-"
+
str
(
k
)])
item
[
"price_us"
]
=
float
(
0
)
item
[
"price_cn"
]
=
float
(
ladder_prices
[
"price-jpy-"
+
str
(
i
)])
item
[
"price_cn"
]
=
float
(
ladder_prices
[
"price-jpy-"
+
str
(
k
)])
table
[
"ladder_price"
]
.
append
(
item
)
ans
=
json
.
dumps
(
table
)
print
(
ans
)
...
...
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