Skip to content

Instantly share code, notes, and snippets.

View renegarcia's full-sized avatar

Rene Garcia renegarcia

View GitHub Profile
@renegarcia
renegarcia / onedrive_dd_generator.py
Created November 19, 2023 15:33 — forked from JoeThunyathep/onedrive_dd_generator.py
Generate direct download link from OneDrive
import base64
def create_onedrive_directdownload (onedrive_link):
data_bytes64 = base64.b64encode(bytes(onedrive_link, 'utf-8'))
data_bytes64_String = data_bytes64.decode('utf-8').replace('/','_').replace('+','-').rstrip("=")
resultUrl = f"https://api.onedrive.com/v1.0/shares/u!{data_bytes64_String}/root/content"
return resultUrl
@renegarcia
renegarcia / test.py
Last active August 29, 2015 14:19 — forked from href/test.py
import inspect
import morepath
import os
from webob import static
class App(morepath.App):
@property