Git Product home page Git Product logo

gofile-downloader's Introduction

gofile-downloader

Download files from https://gofile.io

Requirements

Python version 3.10 or newer.

Modules:

pip3 install -r requirements.txt

Usage

python gofile-downloader.py https://gofile.io/d/contentid

If it has password:

python gofile-downloader.py https://gofile.io/d/contentid password

Use the environment variable GF_DOWNLOADDIR to specify where to download to (the path must exist already):

GF_DOWNLOADDIR="/path/to/the/directory" python gofile-downloader.py https://gofile.io/d/contentid

Use the environment variable GF_USERAGENT to specify browser user agent (default Mozilla/5.0):

GF_USERAGENT="user agent string" python gofile-downloader.py https://gofile.io/d/contentid

gofile-downloader's People

Contributors

dmitrinove avatar ltsdw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

gofile-downloader's Issues

'type' and 'NoneType'

Hi
i keep getting this error can you tell me how to resolve it

` python gofile-downloader.py https://gofile.io/d/GLankA
Traceback (most recent call last):
File "gofile-downloader.py", line 34, in
class Main:
File "gofile-downloader.py", line 35, in Main
def init(self, url: str, password: str | None = None, max_workers: int = 5) -> None:
TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'

Environment Variable Help

I'm not sure if I'm missing something here...

What value do I set when making a GF_DOWNLOADDIR variable? Or is there some other way I'm supposed to be going about this?

Not really an important issue. I can just move the downloads to wherever I want after completion. I was just curious how I could go about getting this working, if possible. Quality of life type of thing.

Either way, thank you! :)
Cheers!

Account creation failed

Sometimes the script gives an error.

Starting, please wait...
Account creation failed!
Command failed with return code 4294967295

How can i solve the problem?

Error after downloading 42 of 210

Why would this be happening?

Traceback (most recent call last): File "D:\potat0\Downloads\gofile-downloader-main\gofile-downloader.py", line 218, in <module> Main(url=url, password=password)

File "D:\potat0\Downloads\gofile-downloader-main\gofile-downloader.py", line 54, in __init__ self._threadedDownloads()

File "D:\potat0\Downloads\gofile-downloader-main\gofile-downloader.py", line 65, in _threadedDownloads for link in self._getLinks(self._url, self._password):

File "D:\potat0\Downloads\gofile-downloader-main\gofile-downloader.py", line 193, in _getLinks yield content["link"] KeyError: 'link'

Support for erailer Python < 3.10 (TypeError: unsupported operand type(s) for |: 'type' and 'NoneType')

For those who would like to run this great script with eariler version of python < 3.10

As major new features of the 3.10 series, compared to 3.9 and earlier

PEP 604 โ€“ Allow writing union types as X | Y

You need to wrap '|' to a string, therefore little change in the codebase and you can get this up and running.

Change bellow lines:

Replace

def __init__(self, url: str, password: str | None = None, max_workers: int = 5) -> None:

To

    def __init__(self, url: str, password: "str | None" = None, max_workers: int = 5) -> None:

Replace

self._downloaddir: str | None = getenv("GF_DOWNLOADDIR")

To

        self._downloaddir: "str | None" = getenv("GF_DOWNLOADDIR")

Replace

self._password: str | None = sha256(password.encode()).hexdigest() if password else None

To

        self._password: "str | None" = sha256(password.encode()).hexdigest() if password else None

Replace

has_size: str | None = None

To

        has_size: "str | None" = None

Replace

def _parseLinks(self, _id: str, token: str, password: str | None = None) -> None:

To

    def _parseLinks(self, _id: str, token: str, password: "str | None" = None) -> None:

Replace

url: str | None = None
password: str | None = None

To

        url: "str | None" = None
        password: "str | None" = None

Tested on Python 3.9.18

Add shebang

Kind of a nitpick, but could you please add a shebang to the script, so that users can run the script directly without prefixing it with python?

#!/usr/bin/env python3 should be fine

I'm getting this error?

line 49, in Main
def init(self, url: str, password: str | None = None, max_workers: int = 5) -> None:
TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'

TypeError

C:\Users\JUsername\Downloads\gofile-downloader-main>gofile-downloader.py https://gofile.io/d/Eiadkm
Traceback (most recent call last):
  File "C:\Users\JUsername\Downloads\gofile-downloader-main\gofile-downloader.py", line 34, in <module>
    class Main:
  File "C:\Users\JUsername\Downloads\gofile-downloader-main\gofile-downloader.py", line 35, in Main
    def __init__(self, url: str, password: str | None = None, max_workers: int = 5) -> None:
TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'

I get that error code

Pip install error

Hi,

I run pip install requirements.txt but I'm giving:

ERROR: Could not find a version that satisfies the requirement requirements.txt
ERROR: No matching distribution found for requirements.txt

New token

The website token has changed since yesterday, "websiteToken" must be replaced with "wt" and "7fd94ds12fds4" with "4fd6sg89d7s6"

TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'

Hi,

I run script in linux with python Python 3.9.2:

python3 gofile-downloader.py https://gofile.io/d/aBcDeF

or

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

and I get

Traceback (most recent call last):
File "/home/myuser/tools/gofile-downloader/gofile-downloader.py", line 48, in
class Main:
File "/home/myuser/tools/gofile-downloader/gofile-downloader.py", line 49, in Main
def init(self, url: str, password: str | None = None, max_workers: int = 5) -> None:
TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'

script will fail if no links are in the given folder

Thanks for this great script. I have one issue with it:
When no files are in the given folder, but instead in subfolders (I believe the script does not recurse yet?), it will just throw an error.
Is the possibility to recurse through subfolders something you'd be willing to look into?

Go-File uploader stuck after a few files

Hey,
Ive got the issue that on some container, the downloader start to download a few files and then just stuck at one file

OS: macOS Monterey
Python Version: Python 3.10.5

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.