Update data_source.py

This commit is contained in:
HibiKier
2021-07-31 21:21:47 +08:00
committed by GitHub
parent 6dbb4be824
commit c14b13ee6c
+1
View File
@@ -79,6 +79,7 @@ async def get_setu_urls(
",".join(tags),
)
)
num = num if num < len(data) else len(data)
random_idx = random.sample(range(len(data)), num)
x_urls = []
x_text_lst = []