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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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 = []