Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Define the URL of the Pastebin user profile
- $userProfileUrl = "https://pastebin.com/u/Sweetening"
- # Use Invoke-WebRequest to fetch the content of the user profile page
- $response = Invoke-WebRequest -Uri $userProfileUrl
- # Use a regular expression to find paste links in the HTML content
- # This is a very basic and fragile way to parse HTML and might not work correctly if Pastebin's HTML structure changes
- $pasteLinks = $response.Content | Select-String -Pattern '/Sweetening/\w+' -AllMatches | ForEach-Object { $_.Matches } | ForEach-Object { $_.Value }
- # Remove duplicate links if any
- $pasteLinks = $pasteLinks | Select-Object -Unique
- # Output the paste links
- $pasteLinks | ForEach-Object {
- Write-Output "https://pastebin.com$_"
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement