for catalogue in all_catalogue:
detail = catalogue['href']
f = open("course_catalogue.txt","w")
f.write("https://www.coursera.org" + detail + '\n' )
f.close
这个是我的代码,爬取coursera中的10课程目录链接,但是build完之后,看到txt中只写入了10个目录链接中的最后一个,求解啊,谢谢大家
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
小伙看你根骨奇佳,潜力无限,来学PHP伐。