Esempio n. 1
0
urls = [
    'http://casascius.uberbills.com/api/?status=active',
    'http://casascius.uberbills.com/api/?status=opened'
]

try:
    os.remove('../Lists/casascius.csv')
except:
    pass

for url in urls:
    res = urllib.request.urlopen(url)
    coins = json.loads(res.readall().decode('utf-8'))

    print(len(coins), "coins retrieved.")

    with open('../Lists/casascius.csv', 'a') as f:
        writer = csv.writer(f)

        for coin in coins:
            coin_type = str(coin['type'])
            address = coin['address']

            if coin_type == 'o5':
                coin_type = '0.5'

            if coin_type == 'o1':
                coin_type = '0.1'

            if len(coin_type) > 0 and isBTCAddress(address):
                writer.writerow([address, coin_type])
Esempio n. 2
0
import os
from bitcoin_functions import isBTCAddress

urls = ['http://casascius.uberbills.com/api/?status=active', 'http://casascius.uberbills.com/api/?status=opened']

try:
	os.remove('../Lists/casascius.csv')
except:
	pass

for url in urls:
	res = urllib.request.urlopen(url)
	coins = json.loads(res.readall().decode('utf-8'))

	print(len(coins), "coins retrieved.")

	with open('../Lists/casascius.csv', 'a') as f:
		writer = csv.writer(f)

		for coin in coins:
			coin_type = str(coin['type'])
			address = coin['address']

			if coin_type == 'o5':
				coin_type = '0.5'

			if coin_type == 'o1':
				coin_type = '0.1'

			if len(coin_type) > 0 and isBTCAddress(address):
				writer.writerow([address, coin_type])
Esempio n. 3
0
import json
import csv
import os
from bitcoin_functions import isBTCAddress

urls = ['https://bitfunder.com/assetlist.json']

try:
	os.remove('../Lists/shareholders.csv')
except:
	pass

for url in urls:
	request = urllib.request.Request(url)
	request.add_header('User-Agent', 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:22.0) Gecko/20100101 Firefox/22.0')

	res = urllib.request.urlopen(request)
	assets = json.loads(res.readall().decode('utf-8'))
	duplicate_list = []

	print(len(assets), "assets retrieved.")

	with open('../Lists/shareholders.csv', 'a') as f:
		writer = csv.writer(f)

		for asset in assets:
			address = asset['user_btc_address']

			if address not in duplicate_list and isBTCAddress(address):
				writer.writerow([address, "1"])
				duplicate_list += address
Esempio n. 4
0
from bitcoin_functions import isBTCAddress

urls = ['https://bitfunder.com/assetlist.json']

try:
    os.remove('../Lists/shareholders.csv')
except:
    pass

for url in urls:
    request = urllib.request.Request(url)
    request.add_header(
        'User-Agent',
        'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:22.0) Gecko/20100101 Firefox/22.0'
    )

    res = urllib.request.urlopen(request)
    assets = json.loads(res.readall().decode('utf-8'))
    duplicate_list = []

    print(len(assets), "assets retrieved.")

    with open('../Lists/shareholders.csv', 'a') as f:
        writer = csv.writer(f)

        for asset in assets:
            address = asset['user_btc_address']

            if address not in duplicate_list and isBTCAddress(address):
                writer.writerow([address, "1"])
                duplicate_list += address