Compare commits
No commits in common. "9cc701869868f2adb3465a7721122280a16e971e" and "b45b611eea7bf828701a81d2a7571621e4c776b4" have entirely different histories.
9cc7018698
...
b45b611eea
|
@ -1 +1 @@
|
|||
__version__ = '0.1.44'
|
||||
__version__ = '0.1.43'
|
||||
|
|
|
@ -12,15 +12,13 @@ from .. import secrets
|
|||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
def get_client():
|
||||
assert secrets.KUCOIN_KEY, 'Missing secret: KUCOIN_KEY'
|
||||
assert secrets.KUCOIN_SECRET, 'Missing secret: KUCOIN_SECRET'
|
||||
assert secrets.KUCOIN_PASS, 'Missing secret: KUCOIN_PASS'
|
||||
return kucoin.client.Client(
|
||||
|
||||
# TODO: Move these into secrets!
|
||||
client = kucoin.client.Client(
|
||||
secrets.KUCOIN_KEY,
|
||||
secrets.KUCOIN_SECRET,
|
||||
secrets.KUCOIN_PASS,
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
def addresses_to_data_points(addresses: list[dict[str, str]]) -> frozendict:
|
||||
|
@ -42,5 +40,5 @@ class KucoinDepositAddresses(Scraper):
|
|||
deduplicate_ignore_columns = ['account.update_time']
|
||||
|
||||
def scrape(self) -> Iterator[Mapping[str, object]]:
|
||||
addresses = get_client().get_deposit_address('MPC')
|
||||
addresses = client.get_deposit_address('MPC')
|
||||
yield addresses_to_data_points(addresses)
|
||||
|
|
|
@ -124,7 +124,7 @@ def main(
|
|||
OUTPUT_PATH / f'{scraper.dataset_name}.csv',
|
||||
result_rows,
|
||||
deduplicate_mode=scraper.deduplicate_mode,
|
||||
deduplicate_ignore_columns=scraper.deduplicate_ignore_columns,
|
||||
deduplicate_ignore_columns=scraper.deduplicate_ignore_columns(),
|
||||
)
|
||||
logger.info('Scraper done: %s', scraper.dataset_name)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user