Created
December 22, 2020 01:47
-
-
Save Windos/b3c89ff816be6787f567515951321b31 to your computer and use it in GitHub Desktop.
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
# May need to update the "Chrome Driver", run this from the module path (it's not an imported command) | |
# .\Selenium-Binary-Updater.ps1 | |
# Start the driver (this is headless so you shouldn't see anything. Do this once. | |
$StartUri = 'https://www.twitch.tv/' | |
$Driver = Start-SeChrome -Arguments "incognito" -HideVersionHint -StartURL $StartUri -Quiet -Headless | |
# Repeat this part for each profile | |
# Specify the user you're looking for | |
$UserName = 'WindosNZ' | |
# Open the profile's about page | |
Open-SeUrl -Url "https://www.twitch.tv/$UserName/about" -Target $Driver | |
# Find all the avatars (can include chat for a live streamer), and filter for the BIG one | |
$Avatar = (Find-SeElement -By Class -Selection 'tw-image-avatar' -Target $Driver).Where({$_.GetAttribute('src') -like '*-300x300.jpeg'}) | |
$AvatarURI = $Avatar.GetAttribute('src') | |
$AvatarURI |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
And when cleaning up:
$Driver.quit()