Nexuist / CoinMarketCapAPI

JSON API for coinmarketcap.com written in node and hosted on OpenShift.
https://coinmarketcap-nexuist.rhcloud.com
54 stars 24 forks source link

Full name is being truncated #8

Closed Nexuist closed 8 years ago

Nexuist commented 9 years ago

Thanks to @xbte on Twitter for pointing this out.

For coins like "MasterCoin (Omni)" the API is returning "MasterCoin (...". This is due to the fact that this is what the text on coinmarketcap.com says. The relevant HTML is below:

     <td class="no-wrap currency-name">
                    <img src="/static/img/coins/16x16/mastercoin.png" class="currency-logo" alt="Mastercoin (Omni)">
                    <a href="/currencies/mastercoin/">Mastercoin (..*</a>
                </td>

Thankfully, this appears to be an easy fix. Instead of extracting the name from the anchor tag we can just get the alt text from the img tag. I'll try to get this done soon.

Nexuist commented 8 years ago

Closed with v2.0.