ltsdw / gofile-downloader

Download files from https://gofile.io
GNU General Public License v3.0
154 stars 38 forks source link

Download directly file to working directory without creating subfolders #29

Closed Sonic3R closed 3 months ago

Sonic3R commented 3 months ago

Hello,

What line(s) should change in order to download file directly without nested folders ?

I mean if I use

./gofile-downloader.py https://gofile.io/d/AbCdEf

and it has 1 file inside, I want to put directly in current working directory.

Now, the script creates the following folder structure: AbCdEf/AbCdEf/this_is_file.mp4 which I see is duplicated.

If there is alot of files, then create one single structure AbCdEf not doubled.

ltsdw commented 3 months ago

Hello there o/

Should be fixed by https://github.com/ltsdw/gofile-downloader/commit/c98ecceac1edcc75101be7ae99850c03d507efa4.

Closing.

Sonic3R commented 3 months ago

There is error


"/tools/gofile/gofile-downloader.py", line 165
    "Referer": f"{url}{("/" if not url.endswith("/") else "")}",
                         ^
SyntaxError: f-string: unmatched '('
ltsdw commented 3 months ago

Weird, because I didn't touched this part of the function. Was it working before?

Can you try this change:

-"Referer": f"{url}{("/" if not url.endswith("/") else "")}",
+"Referer": f"{url}{('/' if not url.endswith('/') else '')}",

And see if it works.

Sonic3R commented 3 months ago

Yes that line and other two lines from 239 as well, now is working fine

thanks

ltsdw commented 3 months ago

@Sonic3R

Thank you for the feedback, do you mean that the line 239 have this happening too?

This one?

https://github.com/ltsdw/gofile-downloader/blob/c98ecceac1edcc75101be7ae99850c03d507efa4/gofile-downloader.py#L239

Also, which python version are you using?