How to Archive or Scrape MediaFire Files using mf-dl

How to Archive or Scrape MediaFire Files using mf-dl

MediaFire is a home to millions of files! MediaFire’s generous upload limits appeal to visual artists who can upload their work in higher resolutions, composers and remixers who want to host their WIP music off-platform; and really anyone who wants to upload big .zip files.

Unfortunately, MediaFire doesn’t have a search/discovery feature, relying entirely on search engine traffic and external linking. There’s a lot of undiscovered things on MediaFire, and Pyxia’s mf-dl tool is one of the first tools that we have for exploring it. Read on to learn how to install and use mf-dl to easily download MediaFire files and crawl undiscovered corners of the internet!


mf-dl follows the usual steps for setting up a python tool:

  1. Install Python 3 if you don’t already have it on your device.
  2. Clone the mf-dl repository from using a git client. Alternatively download the repo and unzip it.
  3. Using a terminal, cd into the mf-dldirectory and run python3 -m pip install -r requirements.txt.

Downloading Files with is a bulk-downloader for MediaFire links. You may have found these links yourself, copied them from your bookmarks or possibly scraped them beforehand. At any rate, will download the contents and metadata for a list of links that have already been collected.

The input is a sequence of links and can be any file separated by spaces, new-lines or commas. Ideally, you might want to use a spreadsheet-friendly CSV file. For this tutorial, copy the table below into Excel, or another spreadsheet editor, and save it aslinks.csv.

Next we will need an output directory to save mf-dl’s grabs. mf-dl does not have permission to create new directories, so you will have to create a new folder if the destination doesn’t already exist. For demonstration’s sake we will create/output directory under mf-dl.

If you have been following along, your mf-dl folder should look a little something like this.

To run, execute the following command from inside your terminal and will begin downloading the contents of the input links into the output directory.

> python3 output links.csv

Protip #1: Increasing Download Throughput can download several files concurrently. By default, runs 6 threads; so that means that it will initiate 6 synchronous downloads at a time. If you have a high network bandwidth, you might want to increase the number of threads to maximize your downloading speed. Or if MediaFire is upset with your frequent downloads and is throwing CAPTCHAs your way, you can decrease your thread count. Use this modified version of the call to change your thread-count.

> python3 --threads NEWTHREADCOUNT output links.csv

Protip #2: Multiple Input Files
All arguments after the output are treated as input files. If you have links split across several files, you can simply concatenate them to the end of the command.

> python3 output links.csv links2.csv links3.csv

Scraping MediaFire links with is a utility for discovering new MediaFire links. That’s right, links not does not download the corresponding files and we will need to later feed the outputted links into

Setting up is a bit more straightforward. Then we need a seed URL to initiate the crawl. Any site with downloadables will make for a nice link farm. In this case we’ll be using the Minecraft Pocked Edition Downloads site as our seed.

To run, execute the following. Note that will run indefinitely as new links are discovered, until its execution is interrupted.

> python3 links_found.txt

Protip #1: Feeding Back Links
You can feed links found using with

> python3 output links_found.txt

In fact, if you’re familiar with Crontab, you can schedule jobs to download new links as they are added to links_found.txt. This away, you can continue to download new links, without ever stopping

Protip #2: Depth Control
You can‘s search by specifying a filter. If you want to keep your search to, ignoring out-links to facebook etc. you can --filter

> python3 --filter links_found.txt

Alternatively, you can specify --regex option if would rather filter with regular expressions instead.

Protip #3: Thread Control can also run on multiple threads, 6 by default. You can choose the number of maximum threads you want to use by, again, specifying the --threads option.

> python3 --threads NEWTHREADCOUNT links_found.txt

Have any more questions? To learn more about MediaFire archiving, check out the MediaFlare project!


  1. Avatar photo Gram

    How do I retain the directory structure of the scrape? It’s all there but completly unsorted.

  2. Avatar photo Thompson

    This is too much for me to comprehend, I’m just trying to get an old Minecraft map back…

    • Avatar photo redr

      dude i’m in search for some rare stardew valley portraits same thing

  3. Avatar photo Pam

    So grateful for your work here, all the more puzzle after I installed the latest Python, unzipped mf-dl and entered the cd command only to get “cd: no such file or directory: mf-dl-master” when it’s clearly unzipped and ready. Then I notice I must install a certify so I enter “$ pip install certifi” and get “zsh: command not found: $” All this just to download my own Mediafire files now hiding behind a paywall popup.

    • Avatar photo Anonymous

      when youre inside the folder just click the address bar and type cmd to open a command window from that folder

  4. Avatar photo aids

    any noob meinkrafters, if you get the python3 is not recognized thingy, try just “py” instead of “python3”

  5. Avatar photo Asdf

    Many of the files won’t download, at all. For example, even when I was using the tutorial links, the terminal would return “Couldn’t find download URL” and continue executing…

    • Avatar photo MrCool

      The code needs to be updated for it to work. Just find download_link_prefix and change it to

      download_link_prefix = ‘\nPreparing your download…\n<a class="input popsok" aria-label="Download file" href="'

      I would send a PR but the repository is on some weird site I won't have time to sign up there.

    • Avatar photo MrCool

      just need to adjust download_link_prefix a little due to html changes on I would send a PR but the code is hosted on some weird site i don’t have account for.

  6. Avatar photo Nora

    All the file cannot download. The terminal just return “Couldn’t find download URL”

    • Avatar photo themadprogramer

      hey! just as MrCool said, there was a layout update to MediaFire and that broke the tool.

      I’m waiting on Pyxia to publish my pull request to update it, but until then you can follow the workaround MrCool wrote by replacing a line in the code. Just open it in any text editor, edit and save!

  7. Avatar photo MigginBach

    It says its downloading files but its not being sent to the output folder i made in the MF-DL directory, wheres it sending it to? did i do something wrong somewhere? the only thing that appears in there is a 0kb custom folders txt file

  8. Avatar photo 8BitMiller

    I’ve used the workaround and everything seems to act like its downloading stuff but nothing is actually going to the output file, not even the tutorial links are they for whatever reason going somewhere else or did I just not apply the workaround right?

  9. Avatar photo Vorporal

    The last suggestion didn’t work for me.

    Got it to work by using:
    download_link_prefix = ‘<a class="input popsok" aria-label="Download file" href="'

    Thanks MrCool and Pyxia

  10. Avatar photo Nath

    Line 38 in change it to :

    download_link_prefix = ‘\n<a class="input popsok" aria-label="Download file" href="'

  11. Avatar photo giorno420

    anyone getting the error after a while:
    requests.exceptions.ReadTimeout : HTTPSConnectionPool(host=’’, port=443): Read timed out. (read timeout = 30)

    anyone getting this? does this skip the file or just retry the file to download for later? thanks!

  12. Avatar photo Anonymous

    i keep getting the “Unable to create process using ‘/bin/env python3 output links.csv'” when i try to run it. what do i do?

    • Avatar photo glmdgrielson

      That sounds like A. you’re running the script as just ... and B. your computer doesn’t recognize python3 as a command. Look into your package manager, maybe?

  13. Avatar photo Anonymous

    any got this working in 2023?

Leave a Reply

Your email address will not be published. Required fields are marked *