This file contains 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
Set WshShell = CreateObject("WScript.Shell") | |
WshShell.Run "" & "app.py" & "", 0 | |
Set WshShell = Nothing |
This file contains 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
let links = document.querySelectorAll('.downloadcolumn > .downloadlink:last-of-type') // Gets magnet link if available | |
for (const link of links){ | |
window.location = link.href | |
} |
This file contains 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 requests, json | |
url = 'https://discord.com/api/webhooks/123/131232123' # Create webhook in your server integrations and copy webhook URL here | |
## Text only: | |
data = { | |
"content" : "Test webhook message" | |
} | |
result = requests.post(url, json=data) |
This file contains 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
from datetime import datetime | |
date = 'Sat Nov 13 11:54:30' | |
date = datetime.strptime(date, '%a %b %d %H:%M:%S') # Sat Nov 13 11:54:30 | |
date = date.strftime("%Y-%m-%d, %H:%M:%S") # 2021-11-13, 11:54:30 |
This file contains 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
''' | |
settings.ini: | |
[Settings] | |
username = my_username | |
password = my_password | |
''' | |
from configparser import ConfigParser |
This file contains 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 regex | |
url = 'https://gfycat.com/HeftyHonoredHadrosaurus' | |
prefix = 'https://gfycat.com/' | |
# https://gfycat.com/HeftyHonoredHadrosaurus to HeftyHonoredHadrosaurus | |
slug = regex.search(rf'(?<={prefix})\w+', url).group() |
This file contains 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
:root { | |
--background: #202020; | |
--accent: #fff; | |
--tertiary: #191919; | |
--tertiary-accent: #313131; | |
} |
This file contains 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
from bs4 import BeautifulSoup | |
import requests | |
page = requests.get(url) | |
soup = BeautifulSoup(page.content, 'html.parser') | |
elements = soup.select('div.class') | |
element = soup.select_one('div#id') | |
print(element['href']) # Element link | |
print(element.text.strip()) # Element text |
This file contains 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
from selenium import webdriver | |
from selenium.webdriver.chrome.options import Options | |
from selenium.webdriver.support.ui import Select | |
options = Options() | |
options.add_experimental_option('excludeSwitches', ['enable-logging']) | |
options.add_argument('--headless') | |
driver = webdriver.Chrome(options=options) |
This file contains 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 | |
sys.stdout.reconfigure(encoding='utf-8') |
NewerOlder