raawaa / jav-scrapy

批量抓取AV磁链或封面的苦劳力
1.05k stars 211 forks source link

Update jav.js #19

Closed ilcn closed 6 years ago

ilcn commented 7 years ago

the two altered lines, threw errors too often. Try-catch is added to escape this. As a result, the images where these errors take place will be 3kb "Now Printing" placeholder files (possibly from nodejs?).

Example error:

fs.js:741 return binding.rename(pathModule._makeLong(oldPath), ^

Error: ENOENT: no such file or directory, rename 'pics/CYD-005/CYD-005l.jpg.part' -> 'pics/CYD-005/CYD-005l.jpg' at Object.fs.renameSync (fs.js:741:18) at Request. (/Users/xxx/Downloads/jav-scrapy-master/jav.js:344:16) at emitOne (events.js:101:20) at Request.emit (events.js:188:7) at IncomingMessage. (/Users/xxx/Downloads/jav-scrapy-master/node_modules/request/request.js:1001:12) at IncomingMessage.g (events.js:292:16) at emitNone (events.js:91:20) at IncomingMessage.emit (events.js:185:7) at endReadableNT (_stream_readable.js:974:12) at _combinedTickCallback (internal/process/next_tick.js:74:11) at process._tickCallback (internal/process/next_tick.js:98:9)

raawaa commented 6 years ago

The "Now Printing" image placeholder is from the website itself. For example, if you open this link, you will see the clip cover image shows "Now Printing".

I failed to reproduce the ENOENT error you've encountered. And... the codebase has been greatly changed since this pull request. I'd rather close this PR...

HAPPY CODDING 💕