Skip to content

Instantly share code, notes, and snippets.

View yodaluca23's full-sized avatar

Luca LeBlanc yodaluca23

  • Texas, United States
  • 13:19 (UTC -05:00)
View GitHub Profile
@yodaluca23
yodaluca23 / BeautifulLyricsSaveLyrics.py
Last active July 21, 2024 19:18
Fetch .lrc files for all songs in directory, from the Beautiful lyrics, API, supports A2 extension (Enhanced LRC format).
import os
import requests
import json
import re
from bs4 import BeautifulSoup
# Function to load configuration from BLconfig.txt
def load_config():
if os.path.exists('BLconfig.txt'):
with open('BLconfig.txt', 'r') as config_file:
@yodaluca23
yodaluca23 / MusixMatchSaveLyrics.py
Last active July 19, 2024 06:23
Fetch .lrc files for all songs in directory, from MusixMatch.
# To get a MusixMatch token, download the app
# Go to settings (Top right corner) > Scroll all the way down > click "Get help" > click "Copy debug info"
# [UserToken] is your API key.
# After this finishes, you can fill in the rest from libLRC database using https://github.com/tranxuanthang/lrcget
import os
import requests
import json
import re
@yodaluca23
yodaluca23 / IMDBFrontEnd.html
Created July 18, 2024 00:13
View Basic Data from IMDB, and get hyperlink to move/show page.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>IMDB Search</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
color: #333;
@yodaluca23
yodaluca23 / Weather.py
Last active July 17, 2024 23:15
Get weather from the CLI! No idea why you would want to do this but now you can!
import requests
import re
from datetime import datetime
def extract_appid():
url = "https://openweathermap.org/themes/openweathermap/assets/vendor/owm/js/weather-app.cb2cf0fb.js"
try:
response = requests.get(url)
response.raise_for_status() # Raise an error for bad status codes
content = response.text
@yodaluca23
yodaluca23 / Beautiful-Lyrics-API-Python.py
Last active July 19, 2024 20:09
Ultimate Lyrics fetcher, gets lyrics from Beautiful Lyrics API, using Spotify SongID, uses Spotify API, with hacky ways to get token, to match song and artist to ID.
import requests
from bs4 import BeautifulSoup
import urllib.parse
import re
import json
def get_bearer_token():
fetch_url = "https://open.spotify.com"
response = requests.get(fetch_url)
@yodaluca23
yodaluca23 / XMLtoSwiftDict.swift
Created July 17, 2024 02:40
Convert XML data to a swift dictionary using Foundation's XML Parser handles nestled elements, converts to array if same named keys.
import Foundation
import FoundationXML
class XMLDictionaryParser: NSObject, XMLParserDelegate {
private var dictionaryStack: [[String: Any]] = []
private var textInProgress: String = ""
func parse(data: Data) -> [String: Any]? {
let parser = XMLParser(data: data)
parser.delegate = self
@yodaluca23
yodaluca23 / PetitLyricsUnofficial.py
Last active July 16, 2024 20:50
Fetch Lyrics From Petit Lyrics
import requests
import re
import base64
from bs4 import BeautifulSoup
# Function to extract the first LYRICID from the HTML response
def extract_lyric_id(html_content):
soup = BeautifulSoup(html_content, 'html.parser')
table = soup.find('table', id='lyrics_list')
if table:
@yodaluca23
yodaluca23 / DiscordAppleStoreAppUpdateNotif.py
Last active September 5, 2024 22:36
Discord Webhook Ping when Apple AppStore App update
# Thank you to https://github.com/asdfzxcvbn/update-notifier for figuring out how to force the iTunes API, to not use cache.
import os
import requests
import subprocess
import json
# Configurations
version_file = "app_version.txt" # The text file where the version number will be saved will be prefixed with the apps BundleID
webhook_url = "DISCORDWEBHOOK" # Your Discord webhook URL
app_bundleID = "com.google.ios.youtube" # The BundleID for the app you want updates for. You can get the BundleID from here https://armconverter.com/appinfo
@yodaluca23
yodaluca23 / Discord Sideloadly Patcher.ps1
Last active September 15, 2024 21:23
Patch a Discord IOS App file to have shorter paths to be used with Sideloadly on Windows
<#
Version 3
To run this script, open a new Command Prompt session and execute the following command:
powershell -ExecutionPolicy Bypass -File "D:\Path\To\Your\Discord Sideloadly Patcher.ps1" -ipaFilePath "D:\Path\To\Your\Discord.ipa"
Replace "D:\Path\To\Your\Discord Sideloadly Patcher.ps1" with the full path to this script, and "D:\Path\To\Your\Discord.ipa" with the full path to your Discord IPA file.
Using -ExecutionPolicy Bypass allows the script to run without changing the execution policy for the session, ensuring successful execution.
#>