GithubHelp home page GithubHelp logo

cycno / directdownload Goto Github PK

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

A Direct Downloader Module Which Will Get Direct Download Link From Some Popular File Uploading Websites

Home Page: https://pypi.org/project/Direct-Download/

License: MIT License

Python 100.00%
anonfile anonfiles directdownload download mediafire python python3 anonfiles-direct-download download-direct mediafire-direct-download

directdownload's Introduction

Direct Download

A simple yet powerful tool for getting direct download link.


Feautres

  • All Information Of File Is Available
  • No Need To Sign Up Or Usage Of Tokens
  • Data Is In JSON Format
  • Download the file
  • Switch Between Just Download Link Or ALL Information
  • Very Easy To Use

Supported Website

Installation

You Can Install Direct Download Using PIP

pip install Direct-Download

Quick Start

#First Import Direct From Module
from Direct_Download import Direct

#Declaring Variable As a Class
url = Direct()

#For mediafire
link = url.mediafire('https://www.mediafire.com/view/n2kcs3n9nd88vnr/picture.jpeg/file')
print(link)

#Output
#'https://download1482.mediafire.com/4f1knkpxhq6g/n2kcs3n9nd88vnr/picture.jpeg'

#For Anonfiles
link = url.anonfiles('https://anonfiles.com/n4pdf5Fdy1/night-mountains-minimalist-8k-wo_1_jpeg')
print(link)

#Output
#'https://cdn-126.anonfiles.com/n4pdf5Fdy1/889ab081-1667110179/night-mountains-minimalist-8k-wo (1).jpeg'

Usage/Examples

Get All Information About File metadata=True

from Direct_Download import Direct

url = Direct()

#Use Metadata By Enabling Metadata to True
link = url.mediafire('https://www.mediafire.com/file/n2kcs3n9nd88vnr/picture.jpeg/file', metadata=True)
print(link)

# Output
#{'data': {'file': {'metadata': {'DateAndTime': {'date': '2022-10-20',
#                                                'time': '11:00:27'},
#                                'id': 'www.mediafire.com',
#                                'name': 'picture',
#                                'size': {'readable': '73.62KB'}},
#                  'url': {'directDownload': 'https://download1482.mediafire.com/h32ugeuxwitg/n2kcs3n9nd88vnr/picture.jpeg',
#                           'original': 'https://www.mediafire.com/file/n2kcs3n9nd88vnr/picture.jpeg/file'}}},
# 'status': 'true'}

Download the file download=True

from Direct_Download import Direct

url = Direct()

#Use download By Enabling download to True for downloading your file 
url.mediafire('https://www.mediafire.com/file/n2kcs3n9nd88vnr/picture.jpeg/file', download=True)

Links

Contributors

CYCNO

Contributors are always welcome!

directdownload's People

Contributors

cycno avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

directdownload's Issues

it returns a redirect link

when I used it first it worked normally but now most of the time the return link is not direct
it redirect me to another link

v0.4.4 - 193534

Hello,

When trying to get a direct download link for any mediafire URL (including the one in the example on your website) I get an error of "193534"

`>>> from Direct_Download import Direct

url = Direct()

url.mediafire('https://www.mediafire.com/file_premium/6mz208axw5ie6xg/Phish_-_02_26_2023_Moon_Palace_Resort%252C_Riviera_Maya%252C_MX_1080p.mkv/file')
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.9/dist-packages/Direct_Download.py", line 11, in mediafire
down_link = down['data']['file']['url']['directDownload']
TypeError: string indices must be integers
url.mediafire('https://www.mediafire.com/view/n2kcs3n9nd88vnr/picture.jpeg/file')
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.9/dist-packages/Direct_Download.py", line 11, in mediafire
down_link = down['data']['file']['url']['directDownload']
TypeError: string indices must be integers`

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.