
标记
GOCI-II数据集下载脚本
运行批量下载脚本
数据集网站:
https://kosc.kiost.ac.kr/gociSearch/list.nm?menuCd=11&lang=ko&url=gociSearch&dirString=/COMS/GOCI/L2/
🌺 有批量下载数据集的需求,直接python运行脚本
如果想下载slot的部分数据,可以按照上一篇文章下载:
选择部分slot下载数据集:https://blog.youkuaiyun.com/qq_44224801/article/details/143882622
import urllib.request
import datetime
import os
# 下载文件函数
def download_file(url, output_dir):
"""
下载文件到指定目录
"""
try:
# 获取文件名
file_name = url.split("/")[-1].split("&")[0] # 提取文件名
output_path = os.path.join(output_dir, file_name)
print(f"正在下载: {
file_name}")
urllib.request.urlretrieve(url, output_path)
print(f"文件已保存: {
output_path}")
except Exception as e:
print(f"下载失败 {
url},错误:{
e}")
# 检测数据函数