Exceen / 4chan-downloader

Python3 script to continuously download all images/webms of multiple 4chan thread simultaneously - without installation
MIT License
277 stars 36 forks source link

Script can't download files from a thread with a other thread quoted (Cross-thread) #13

Closed ghost closed 6 years ago

ghost commented 6 years ago

NSFW

How to reproduce:

1° Try to download from this link: https://boards.4chan.org/gif/thread/13521437

This error appears

File TTT Part 2 Top Tier Titties \1527053877481.webm from https://i.4cdn.org/gif/1536882732639.webm UNKNOWN ERROR OCCURRED [WinError 183] cannot create an existing file: 'C:\\Users\\mario\\4channer\\TTT Part 2 Top Tier Titties '

But the "TTT Part 2 Top Tier Tittiles" and the two .webm files doens't exist. Using a custom folder location doens't work.

Exceen commented 6 years ago

Did you try to rename/move your existing download folder so that the script can download the whole thread again?

ghost commented 6 years ago

Did you try to rename/move your existing download folder so that the script can download the whole thread again?

Yep.

File TTT Part 2 Top Tier Titties \1527053877481.webm from https://i.4cdn.org/gif/1536882732639.webm UNKNOWN ERROR OCCURRED [WinError 183] cannot create an existing file: 'C:\\Users\\mario\\4channer\\test\\TTT Part 2 Top Tier Titties '

Exceen commented 6 years ago
  1. Do other threads work?
  2. Try using the default download directory - does it work in this case?
  3. Did you check your file permissions?
  4. Note that there's a space at the end of the directory name. Maybe that's what's causing the error. I don't have a Windows machine, so it's hard for me the replicated your problem. It looks like that the script checks for a directory called 'TTT Part 2 Top Tier Titties ' which doesn't exist. Therefore, the script tries to create a directory called this way. The problem there is probably that Windows removes the trailing spaces, resulting in 'TTT Part 2 Top Tier Titties' - which is a directory that could possibly already exist.
  5. You modified the default download path - what other modifications did you do?
Exceen commented 6 years ago

I made some changes to the parsing of the thread argument (https://github.com/Exceen/4chan-downloader/commit/a3311b8880444300e59c0208b446fd2287c693b5). Get the current version and try replicating your problem again. Please let me know if this solved your issue.

ghost commented 6 years ago

I made some changes to the parsing of the thread argument (a3311b8). Get the current version and try replicating your problem again. Please let me know if this solved your issue.

Yeah. Works like a charm! Thanks! 👍