Coder Social home page Coder Social logo

bayy420-999 / mediafire-dl-async Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 0.0 6 KB

mediafire downloader with async and split chunk support

Python 100.00%
asyncio downloader mediafire mediafire-directlink mediafire-download mediafire-downloader python3

mediafire-dl-async's Introduction

Mediafire Async downloader

Usage

First, download the projects and go to projects folder

git clone https://github.com/bayy420-999/mediafire-dl-async.git

Then install dependencies by running command below in your terminal

pip install -r requirments.txt

After that, you need to setup main.py file and put mediafire url inside urls

Example:

import asyncio
from mediafire import mediafire_link_parser, mediafire_download, merge_files

async def main():
    urls = [
        'url1',
        'url2',
        'url3'
    ]

    new_urls = await mediafire_link_parser(urls) #parse direct link
    await mediafire_download(new_urls, split_chunk = 10) #download files

if __name__ == '__main__':
    asyncio.run(main())

Then run main.py

python main.python

Additional note

You need to use python3.9+ to use this program, because i use requests and asyncio.to_thread() to make async HTTP request, and asyncio.to_thread() only available in python3.9+

mediafire.py has few functions and each function can run separately

mediafire_link_parser() used to get direct mediafire link, it has few paramater:

  • debug accepting value True/False with False as default value, if you set it to True, it will tell you if you have broken link or if direct download link can't be founded
  • save_results accepting value True/False with False as default value, if you set it to True, the results will be saved in txt file, else it will returning the results

mediafire_download() used to download files from mediafire, it has few parameter:

  • split_chunk accepting integers value, it's used to split download into multiple chunks

merge_files() used to merge part file into one file

mediafire-dl-async's People

Contributors

bayy420-999 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

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.