Open arthin opened 3 years ago
A patch which I propose. prop.diff.gz
Also get an error on nationality
File ".../python3.7/site-packages/sportsreference/nba/roster.py", line 331, in _parse_nationality
nationality = NATIONALITY[nationality]
KeyError: 'ni'
Need to add
ni: Niagara,
to the ./nba/constant
file.
Same for pt
which is for pt:Portugal
Describe the bug Some NBA players cannot be retrieved due to exception because of nationality code absence. I think it's similar to #167, #169 and #202, but the resolution is insufficient.
To Reproduce
Expected behavior I think it will be correct to add a dependency for pycountry. In addition, please add a kind of behavior if country not found, to avoid an exception. 4ex, I believe that result for Chris Duarte("duartch01") is incorrect in the source ("dr" instead of "do"), and it will be well to have a possibility to work in such case.