Post
Topic
Board Altcoin Discussion
Re: [ANN] CryptoSwitcher - Automatically mine the best coin.
by
Wayne187
on 12/03/2014, 03:00:30 UTC
veeeeery nice tool  Grin thank you very much indeed!

After hours of configuration it works very well.
But can somebody tell me how to add more sites like coinchoose?

I've tried the last hours to code it by myself but all was only worst of time.

API:
http://sancrypto.info/api/json/15/

Code:
# sancrypto
        if x=='sancrypto':
            try:
                fullstr = prestr + "sancrypto"
                print fullstr + (79-len(fullstr))*" " + "\r",
                req = urllib2.Request("http://sancrypto.info/api/json/15/")
                opener_sc = urllib2.build_opener()
                opener_sc.addheaders = [('User-agent', 'CryptoSwitcher')]
                f = opener_sc.open(req, timeout = 5)
                data_sc = simplejson.load(f)
            except:
                pass

Code:
           if x=='sancrypto':
                try:
                    for item in data_sc:
                        if item['symbol'].lower()==abbreviation:
                            coins[item['symbol'].lower()].ratio = float(item['ratio'])
                            coins[item['symbol'].lower()].source = 'sc'
   success = 1
   break
                except:
print "ERROR"
continue

I dont know what the problem is. So, if anyone could - please help Wink


EDIT:
Got it, thanks anyway. I did it by myself with a detour. python export now the json into a txt file, add a few thinks like "CoinTag" and it works very well.