common lisp - Trying to get a binary file -


i automate torrent downloading, attempts drakma failed. can please me out?

the code goes follows:

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

aside typo in package name flexi-streams (plural), “works me.”

however, returns primary value sea of binary junk; personally, i'd return filename or something.

nb. useful files small enough fit memory @ go; you're reading entire remote stream, converting string, writing disc.


Comments

Popular posts from this blog

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -