fix mhx hh sharpness
This commit is contained in:
14260
db/mhx/weapon_list.json
14260
db/mhx/weapon_list.json
File diff suppressed because it is too large
Load Diff
@@ -244,12 +244,23 @@ def _get_detailed_sharpness(name, href, parser):
|
|||||||
attr_table = tables[0]
|
attr_table = tables[0]
|
||||||
attr_trs = attr_table.xpath('./tr')
|
attr_trs = attr_table.xpath('./tr')
|
||||||
i = 0
|
i = 0
|
||||||
|
sharpness_col = 3
|
||||||
for tr in attr_trs:
|
for tr in attr_trs:
|
||||||
|
# Try to figure out column with sharpness, hunting horn
|
||||||
|
# pages are different.
|
||||||
|
heads = tr.xpath('./th')
|
||||||
|
if heads:
|
||||||
|
for j, th in enumerate(heads):
|
||||||
|
if u"斬れ味" in th.text:
|
||||||
|
sharpness_col = j
|
||||||
|
continue
|
||||||
|
|
||||||
cells = tr.xpath('./td')
|
cells = tr.xpath('./td')
|
||||||
if not cells:
|
if not cells:
|
||||||
# first row has th, we want to ignore anyway
|
# TODO: this should not happens, since header row is
|
||||||
|
# handled above
|
||||||
continue
|
continue
|
||||||
sharpness_cell = cells[3]
|
sharpness_cell = cells[sharpness_col]
|
||||||
name = names[i]
|
name = names[i]
|
||||||
try:
|
try:
|
||||||
sharpness_levels = _parse_sharpness_td(sharpness_cell)
|
sharpness_levels = _parse_sharpness_td(sharpness_cell)
|
||||||
|
|||||||
Reference in New Issue
Block a user