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 requests | |
from bs4 import BeautifulSoup | |
import pandas as pd | |
import os | |
import argparse | |
import re | |
# CLI arguments | |
parser = argparse.ArgumentParser(description="Check WordPress posts for keywords.") | |
parser.add_argument("-w", "--whole", action="store_true", help="Match whole words only") |
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
<?php | |
/** | |
* ⚠️ IMPORTANT! SECURITY WARNING! ⚠️ | |
* DELETE THIS FILE FROM THE SERVER AFTER USE! | |
* Leaving this script on the server poses a security risk, | |
* as attackers can use it to create archives | |
* containing sensitive data from your website. | |
*/ | |
// Check if ZipArchive class is available |
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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
import os | |
import sys | |
from PIL import Image | |
import argparse | |
from pathlib import Path | |
import re |
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 requests | |
from urllib.parse import urlparse | |
from datetime import datetime | |
from openpyxl import Workbook | |
from openpyxl.styles import Font | |
# — Function: date formatting | |
def format_date(date_str): | |
dt = datetime.fromisoformat(date_str.replace('Z', '+00:00')) | |
return dt.strftime('%d.%m.%Y') |
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
EN: | |
=VALUE(SUBSTITUTE(IMPORTXML("https://coinmarketcap.com/currencies/toncoin/"; "//span[@data-test='text-cdp-price-display']"); "$"; "")) | |
RU: | |
=ЗНАЧЕН(ПОДСТАВИТЬ(ПОДСТАВИТЬ(IMPORTXML("https://coinmarketcap.com/currencies/toncoin/"; "//span[@data-test='text-cdp-price-display']"); "$"; ""); "."; ",")) |
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 pygetwindow as gw | |
# Get a list of all windows with non-empty titles | |
windows = [w for w in gw.getAllWindows() if w.title.strip() != ''] | |
# Check if there are any available windows | |
if not windows: | |
print("No windows with non-empty titles were found.") | |
exit() |
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 | |
def replace_in_html_files(pattern, replacement, folder_path): | |
# Компилируем регулярное выражение | |
regex = re.compile(pattern, re.DOTALL | re.IGNORECASE) | |
# Счетчики для статистики | |
total_files = 0 | |
processed_files = 0 |
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 | |
def replace_in_html_files(pattern, replacement, folder_path): | |
# Счетчики для статистики | |
total_files = 0 | |
processed_files = 0 | |
files_with_matches = 0 | |
files_without_matches = 0 | |
total_matches = 0 | |
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 requests | |
import csv | |
import time | |
from collections import Counter | |
# Settings | |
input_file = 'urls.txt' | |
output_file = 'result.csv' | |
timeout = 10 # Request timeout in seconds | |
delay = 0.5 # Delay between requests to avoid overloading servers |
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
<!DOCTYPE html> | |
<html lang="ru"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Септик Танк - купить в Москве у официального дилера</title> | |
<meta name="description" content="Купить септик Танк в Москве с установкой под ключ. Официальный дилер. Надежная, энергонезависимая и долговечная автономная канализация по выгодной цене."> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta name="robots" content="index, follow"> | |
<link rel="canonical" href="https://example.com/septik-tank"> | |
</head> |
NewerOlder