Skip to content

Instantly share code, notes, and snippets.

View yukiarimo's full-sized avatar
🖥️
Coding

Yuki Arimo yukiarimo

🖥️
Coding
View GitHub Profile
@yukiarimo
yukiarimo / novel_scraper.py
Created November 20, 2025 23:11
Light Novel Web Scraper (from ncode.syosetu.com)
import requests
from bs4 import BeautifulSoup
import time
import os
def sanitize_filename(filename):
"""Removes characters that are invalid for filenames."""
return "".join(c for c in filename if c.isalnum() or c in (' ', '-', '_')).rstrip()
def scrape_novel(novel_code):
@yukiarimo
yukiarimo / apple_dict_extract.py
Created November 20, 2025 22:58
Apple Dictionary Extractor
import json
import re
import sys
from tqdm import tqdm
from html import unescape
from bs4 import BeautifulSoup
def strip_html_tags(html: str) -> str:
"""Remove HTML tags for plain text extraction."""
soup = BeautifulSoup(html, "html.parser")
@yukiarimo
yukiarimo / character-ai-dwnl-2-0.js
Created May 3, 2024 22:53
Character AI Downloader 2.0
let htmlString = document.body.innerHTML
const parser = new DOMParser();
const doc = parser.parseFromString(htmlString, 'text/html');
const messages = [];
const divs = doc.querySelectorAll('.group.relative.max-w-3xl.min-max-w-3xl.m-auto.w-full.p-2');
divs.forEach(div => {
const nameElement = div.querySelector('.text-small');
if (nameElement) {
@yukiarimo
yukiarimo / webnovel-downloader.js
Created March 14, 2024 20:52
Web novel Downloader
function extractAndDownloadAllChapters() {
// Find all containers that hold chapter text
const chapterContainers = document.querySelectorAll('.cha-words');
// Initialize an array to hold all chapter texts
let allChaptersText = [];
// Iterate over each chapter container
chapterContainers.forEach(container => {
// Get all paragraph elements within the container