🇺🇸 English | ᴘᴛ Português | 🇧🇷 Português
Follow the step by step guide to run this code the proper way.
⭐ If you liked this project, please give it a star
Make sure you have the following required things:
.NET SDK
You can download it here- Google Chrome (to run the program)
- Operating System:
Windows
,Linux
ormacOS
- Internet connection
Note
Typically the recommended SDK version is .NET 7
or .NET 8
🚀 1. Clone this repository
git clone https://github.com/dev-ggomes/auto-refresh-any-site.git
cd auto-refresh-any-site
🚀 2. Create and configure the console project (if not already created)
dotnet new console -n GitHubProfileRefresh
cd GitHubProfileRefresh
🚀 3. Add Selenium dependencies
dotnet add package Selenium.WebDriver
dotnet add package Selenium.WebDriver.ChromeDriver
🚀 4. Replace the content of Program.cs
with the one in this repository and make the changes mentioned on the 5th step
🚀 5. Things you may wanna change
-
If you actually wanna see the browser window refreshing, remove this line:
options.AddArgument("--headless");
-
If you want to auto refresh a site, find this line:
driver.Navigate().GoToUrl("https://site.com");
and change the link to the site you want to auto refresh -
This script were made to auto refresh any site every
5 seconds
. If you want to change this period of time between refreshes, change the value of this line:Thread.Sleep(5000);
to every value you think is the better for you.
Warning
Too short periods of time between refreshes may cause a crash in your browser.
🚀 6. Run the project
dotnet run
Press Ctrl
+ C
in the terminal to stop the script.
- Automatically launches
Google Chrome
in headless (invisible) mode. - Visits the url that is saved in the variable
driver.Navigate().GoToUrl("https://site.com")
. - Refreshes the page every 5 seconds, simulating real user behavior (cookies, JavaScript, etc.).
Warning
This project is for educational purposes only. Artifically inflating view counters may violate the terms os service of certain platforms. Use responsibly.