File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ def unformat_bytes(string):
8484 # Old Kaggle Api <1.7
8585 try :
8686 user = dsn .split ("/" )[0 ]
87- dataset = vars (next ((d for d in usernames [user ] if vars (d )['ref' ] == dsn )))
87+ dataset = vars (next ((d for d in usernames [user ] if vars (d )['ref' ]. lower () == dsn . lower () )))
8888 downloads .append (int (dataset ['downloadCount' ]))
8989 views .append (int (dataset ['viewCount' ]))
9090 sizes .append (int (dataset ['totalBytes' ]))
@@ -94,7 +94,7 @@ def unformat_bytes(string):
9494 except KeyError :
9595 try :
9696 user = dsn .split ("/" )[0 ]
97- dataset = next ((d for d in usernames [user ] if d .ref == dsn ))
97+ dataset = next ((d for d in usernames [user ] if d .ref . lower () == dsn . lower () ))
9898 downloads .append (int (dataset .download_count ))
9999 views .append (int (dataset .view_count ))
100100 sizes .append (int (dataset .total_bytes ))
@@ -174,4 +174,4 @@ def default(self, obj):
174174 print (f'Dumping to file...' )
175175 with open ('kaggle_stats.json' ,'w' ) as f :
176176 json .dump (json_dump ,f ,indent = 4 ,cls = NpEncoder )
177- print ("Done." )
177+ print ("Done." )
You can’t perform that action at this time.
0 commit comments