我想自动化我的急流下载,但是使用drakma的尝试失败了。有人能帮帮我吗?
守则如下:
(with-open-file (file "/tmp/test.torrent"
:direction :output
:if-exists :supersede
:if-does-not-exist :create)
(write-string
(flexi-stream:octets-to-string
(drakma:http-request "https://sukebei.nyaa.se/?page=download&tid=2265388"))
file))发布于 2017-04-07 23:07:56
除了包名flexi-streams (复数)中的错误之外,“为我工作”。
但是,它还返回一个二进制垃圾的海洋作为它的主要值;就我个人而言,我会返回文件名或其他东西。
注意:这只对足够小的文件有用,足以在一开始就放入内存;您正在读取整个远程流,然后将其转换为字符串,然后将其写入磁盘。
https://stackoverflow.com/questions/43273669
复制相似问题