Code Monkey home page Code Monkey logo

lain.la-pomf-uploader's Introduction

lain.la-pomf-uploader

pomf.lain.la uploader.

Requirements

requests is used to upload the file.

pyperclip is used to copy the link to the clipboard.

If you want to build this on your own, you can install the requirements with

pip install -r requirements.txt

or install the package by running

pip install lain-upload

Python's native os (used to check for file size), argparse (parse return request and set command argument) and setuptools (used to build the script) packages are also used.

How it works

Files below the file size 1GB can be uploaded to pomf.lain.la and pomf2.lain.la making necessary API calls to https://pomf.lain.la/upload.php endpoint.

I just wrapped it inside said API calls inside Python and added validation to check for size. Links are printed on the terminal and copied to clipboard for ease of use.

You can run the script with

lain-upload <file-path>

You can not upload files bigger than 1 gigabyte.

lain.la-pomf-uploader's People

Contributors

necraul avatar

Stargazers

 avatar

Watchers

 avatar

lain.la-pomf-uploader's Issues

File size limit

Pomf2.lain.la has a file size limit of 1 GiB (approx. 1.073 GB), yet this program won't let me upload anything larger than 954 MiB (despite it being less than maximum file size of 1 GiB and despite actually being able to upload said files directly via the website) and just returns with "Upload failed".

Upload failed

No matter what file I upload, what the file size is, what the file type is, I just keep getting an error saying "Upload failed.", with no context as to WHY the upload failed. It's not a problem with my internet connection, I am able to upload via the website at pomf2.lain.la just fine, but whenever I try to use this tool, it doesn't work at all no matter what I try. Has this tool stopped working, or what?

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.