爬t1

Posted junzhaoliang

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了爬t1相关的知识,希望对你有一定的参考价值。

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(
)

img_names=[]

for line in x:
    for word in line.split( ):
        if(len(word)>10):
            for j in word.split(	):
                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的主要内容,如果未能解决你的问题,请参考以下文章