modis_util.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:scikit-dataaccess 作者: MITHaystack 项目源码 文件源码
def getFileURLs(file_ids):
    '''
    Retrieve the ftp location for a list of file IDs

    @param file_ids: List of file IDs
    @return List of ftp locations
    '''



    info_url='http://modwebsrv.modaps.eosdis.nasa.gov/axis2/services/MODAPSservices/getFileUrls?fileIds='

    for file_id in file_ids:
        info_url += str(file_id) + ','

    info_url = info_url[:-1]


    url = urlopen(info_url)
    tree = ET.fromstring(url.read().decode())
    url.close()

    return [ child.text for child in tree ]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号