This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import re | |
import json | |
from tqdm import tqdm | |
from pathlib import Path | |
from office365.graph_client import GraphClient | |
from office365.onedrive.internal.paths.url import UrlPath | |
from office365.onedrive.driveitems.driveItem import DriveItem | |
from office365.onedrive.driveitems.uploadable_properties import ( | |
DriveItemUploadableProperties, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
import os | |
from tqdm import tqdm as Tqdm | |
from typing import Any, ClassVar | |
from googleapiclient import errors | |
from googleapiclient.http import MediaIoBaseDownload | |
from googleapiclient import _helpers as util | |
from pydrive2.auth import GoogleAuth, LoadAuth | |
from pydrive2.drive import GoogleDrive | |
from pydrive2.files import GoogleDriveFile, FileNotUploadedError, ApiRequestError |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
from pathlib import Path | |
from tqdm import tqdm as Tqdm | |
from pydrive2.auth import GoogleAuth | |
from pydrive2.drive import GoogleDrive | |
param = "FolderID" #FileID is the simple file hash, like 0B1NzlxZ5RpdKS0NOS0x0Ym9kR0U | |
err_fmt = False | |
if len(param) > 33: | |
match = re.search(r"https:\/\/drive\.google\.com\/drive\/folders\/([^/]+)\/view\?usp=drive_link", param) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name n210-dl | |
// @namespace https://gist.github.com/hiroshil | |
// @version 0.1.1 | |
// @description Script used to download manga R18 on some domain of nhentai | |
// @license MIT | |
// @author hiroshil | |
// @source https://gist.github.com/hiroshil/86723bc557efa88931cf6b135e42a2b2 | |
// @match http*://nhentai.to/g/* | |
// @match http*://nhentai.xxx/g/* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import numpy as np | |
from pathlib import Path | |
from PIL import Image | |
def process_file(file_path): | |
""" | |
Reads lines from a file, splits each line by dot, creates tuples with the first and second elements, | |
and appends them to a result array. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name 210vn-dl | |
// @namespace https://gist.github.com/hiroshil | |
// @version 0.0.6 | |
// @description Script dùng để download manga R18 trên 1 domain của hentaivn | |
// @license MIT | |
// @author hiroshil | |
// @source https://gist.github.com/hiroshil/b85af14867493a72bd1cb24831bf0668 | |
// @include http*://*.*/*doc-truyen* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=hentaivn.icu |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name tmo-dl | |
// @namespace https://gist.github.com/hiroshil | |
// @version 1.0 | |
// @description Script to download manga from TuMangaOnline | |
// @license MIT | |
// @author hiroshil | |
// @match https://visortmo.com/library/manga/*/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=visortmo.com | |
// @downloadURL https://gist.github.com/hiroshil/6c4360a56dd37a788646c468fe2ef7fc/raw/3fb7e6fde2dabe3fb4198eda17cce25db89c9dfa/tmo-dl.user.js |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import math | |
from office365.runtime.auth.authentication_context import AuthenticationContext | |
from office365.runtime.client_request_exception import ClientRequestException | |
from office365.sharepoint.client_context import ClientContext | |
baseurl = "https://test-my.sharepoint.com" # sp url | |
basesite = "admin_test_onmicrosoft_com" # sp site name | |
siteurl = baseurl + "/personal/" + basesite # sp site type: personal, teams, sites | |
username = "email" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import base64 | |
import json | |
import requests | |
# https://learn.microsoft.com/en-us/onedrive/developer/rest-api/api/shares_get?view=odsp-graph-online | |
# https://stackoverflow.com/questions/40454101/access-publicly-shared-onedrive-folder-via-api | |
# https://stackoverflow.com/questions/19483351/converting-json-string-to-dictionary-not-list | |
sharing_url = "PUT_SHARE_LINK_HERE" | |
exclude = [] | |
def download_folder(sharing_url, parent_name=''): | |
base64_value = base64.b64encode(sharing_url.encode('utf-8')).decode('utf-8') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
import requests, json | |
from urllib import parse | |
import xmltodict | |
# https://sharepoint.stackexchange.com/questions/238013/get-list-of-files-from-sharepoint-folder-by-url | |
# https://stackoverflow.com/questions/25091976/python-requests-get-cookies | |
# https://github.com/juju/python-libjuju/blob/master/juju/client/gocookies.py | |
# https://stackoverflow.com/questions/13030095/how-to-save-requests-python-cookies-to-a-file | |
# https://stackoverflow.com/questions/71576413/saving-data-to-a-json-file-using-python | |
# https://stackoverflow.com/questions/8628152/url-decode-with-python-3 |
NewerOlder