Skip to content

N791/UpFileLive

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

UpFileLive

UpFileLive is a Python tool designed to interact with the upfile.live file-sharing service. It allows users to upload files and retrieve shareable and downloadable links using both synchronous and asynchronous methods. 中文描述

Installation

Install the library via pip:

pip install UpFileLive

Dependencies

This library requires:

Install Playwright and dependencies:

pip install playwright loguru
python -m playwright install

Usage

Initialization

From UpFileLive import UpFileLive

# Initialize the UpFileLive object
file_uploader = UpFileLive("/path/to/your/file")

Synchronous File Upload

# Upload a file and get the share link
file_uploader.sync_upfile()
print(f"Share Link: {file_uploader.get_share_link()}")

Asynchronous File Upload

import asyncio

async def async_upload():
    await file_uploader.async_upfile()
    print(f"Share Link: {file_uploader.get_share_link()}")

asyncio.run(async_upload())

Synchronous Download Link Retrieval

# Set the share link and retrieve the download link (If you have already run the upfile function, you do not need to set this option.)
# file_uploader.share_link = "<your_share_link>" 
file_uploader.sync_download()
print(f"Download Link: {file_uploader.get_download_link()}")

Asynchronous Download Link Retrieval

async def async_download():
    # file_uploader.share_link = "<your_share_link>"
    await file_uploader.async_download()
    print(f"Download Link: {file_uploader.get_download_link()}")

asyncio.run(async_download())

One-Click Upload and Download

Synchronous

file_uploader.sync_upfile_download()
print(f"Share Link: {file_uploader.get_share_link()}")
print(f"Download Link: {file_uploader.get_download_link()}")

Asynchronous

async def async_upload_download():
    await file_uploader.async_upfile_download()
    print(f"Share Link: {file_uploader.get_share_link()}")
    print(f"Download Link: {file_uploader.get_download_link()}")

asyncio.run(async_upload_download())

License

This project is licensed under the Modified MIT License.

About

A Python tool for interacting with upfile.live for file sharing.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages