https://github.com/riisdev/personal-util
This repo just contains my "Scripts/Util" solution which contains a bunch of methods and classes I use frequently individually for what ever I need done quickly This code should not be used in a professional / efficient manner as it's not been tested.
https://github.com/riisdev/personal-util
porn-scraper scraper util utilities webdriver
Last synced: about 2 months ago
JSON representation
This repo just contains my "Scripts/Util" solution which contains a bunch of methods and classes I use frequently individually for what ever I need done quickly This code should not be used in a professional / efficient manner as it's not been tested.
- Host: GitHub
- URL: https://github.com/riisdev/personal-util
- Owner: RiisDev
- License: mit
- Created: 2025-02-19T09:55:05.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-10-20T09:33:40.000Z (8 months ago)
- Last Synced: 2025-12-26T19:42:22.642Z (6 months ago)
- Topics: porn-scraper, scraper, util, utilities, webdriver
- Language: C#
- Homepage: https://github.com/RiisDev/RadiantConnect
- Size: 95.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
 [](https://discord.gg/yyuggrH) 
# Utilities
This repo just contains my "Scripts/Util" solution which contains a bunch of methods and classes I use frequently individually for what ever I need done quickly
This code should not be used in a professional / efficient manner as it's not been tested and used just by me.
Publicized incase somehow someone needs some code listed here
## Tools Embedded
### Bypassers
* BypassVIP API Usage (Needs api key)
* BypassVIP Telegram Automation (WIP)
* Krnl Keygen / Auto Bypass (WIP)
### Scrapers
* Dynamic PornScraper designated by settings [Examples](https://github.com/RiisDev/Personal-Util/blob/main/Scrapers/NSFW/PrebuiltSettings.cs) | Based on XPath
* PornScraper includes metadata scraping, as well as video downloader (needs login cookies)
* nsw2u.net Scraper (Doesn't include downloading)
### Custom Build WebDrivers - Note I have no idea what the differences are when I wrote them
* HeavyDriver
* LIghtDriver
### Quick File Utilties | Namespace HtmlUtil | Methods are Static
```csharp
public static string[] GetFiles(string directory, string filter = "*.*") => Directory.GetFiles(directory, filter, SearchOption.AllDirectories);
public static string GetFolderFromFile(string file) => Path.GetFileNameWithoutExtension(file).Split('\\').Last();
public static string GetLastDirectory(string directoryPath) => directoryPath.Split('\\').Last();
```
### HtmlAgilityPack Expander | Namespace HtmlUtil | Methods are Static | Properties of HtmlDocument
```csharp
public static List GetLinks(this HtmlDocument document, string html, string? startNodeXPath = null);
public static List> GetNodesData(this HtmlDocument document, string html, string xpath, params string[] attributes);
```
### DataType Expander
```csharp
public static bool TryAdd(this List list, T value);
public static bool RegexEndsWith(this string text, [StringSyntax(StringSyntaxAttribute.Regex)] string pattern) => IsMatch(text, pattern + "$");
public static bool IsNullOrEmpty(this string text) => string.IsNullOrEmpty(text);
public static string Normalize(this string abstractText); // This removes invalid path characters, and normalizes to utf8 etc
public static string SafeFileName(this string abstractFile); // Just gets valid path name
public static string JsonSerialize(TValue obj, bool @unsafe = true); // Encodes unsafe, Writes tab indents, allows floating literals
```
### Formatting / Conversion
* string ConvertSecondsToTime | Returns a formatted string, will take in int/double/long
* (HttpClient, CookieContainer) BuildClient | Builds an http client with default settings and returns as a tuple
* GetRootDomain | Returns the rootdomain and TLD from a url, not sure why it's not built into the Uri namespace
* FormatBytes | Takes in a double, returns a forammted string with B,KB,MB,GB,TB
### Regex Expander
* static string ExtractValue(this Match match, int group = 0) => match.Groups[group].Value;
### Regex Patterns
* JAV Title Naming | RegexPatterns.JavTitle
* Size Grabbing | RegexPatterns.SizeRegex
* ReCaptcha Stuff | RegexPatterns.(GetReCaptchaType/GetReCaptchaToken/GetReCaptchaResponse)