首页 > 其他 > 详细

爬t1

时间:2020-01-02 00:21:15      阅读:120      评论:0      收藏:0      [点我收藏+]
import requests
import webbrowser
import matplotlib.pyplot as plot
from urllib.request import urlopen

with open(t1.txt,r)as f:
    x=f.read().split(\n)

img_names=[]

for line in x:
    for word in line.split( ):
        if(len(word)>10):
            for j in word.split(\t):
                img_names.append(j)

t=http://ec2-18-191-238-20.us-east-2.compute.amazonaws.com/PKxcCwfz/files/data/nifti-png3ch/t1/

for i in img_names[5030:]:
    img_url = t+i
    r=requests.get(img_url)
    #image = urlopen(img).read()
    with open(i,ab)as f:
        f.write(r.content)

爬t1

原文:https://www.cnblogs.com/JunzhaoLiang/p/12130922.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!