MCPcopy
hub / github.com/mvdctop/Movie_Data_Capture / convert

Function convert

scraper.py:192–196  ·  view source on GitHub ↗
(mapping_data, language, vars)

Source from the content-addressed store, hash-verified

190 return total
191
192 def convert(mapping_data, language, vars):
193 if len(mapping_data.xpath('a[contains(@keyword, $name)]/@' + language, name=vars)) != 0:
194 return mapping_data.xpath('a[contains(@keyword, $name)]/@' + language, name=vars)[0]
195 else:
196 raise IndexError('keyword not found')
197
198 for cc in cc_vars:
199 if json_data[cc] == "" or len(json_data[cc]) == 0:

Callers 1

get_data_from_jsonFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected