This repository provides a Python script that allows you to simulate profile views on a GitHub profile by repeatedly reloading the profile page.
The script uses the selenium and requests libraries to fetch the content of the profile page and then reloads the page in a headless Firefox browser. The number of reloads is specified by the user and each reload simulates a new view of the profile.
-
The
get_page_content()
function uses the requests library to fetch the content of the URL passed to it as an argument. The content is returned as bytes and can be decoded using the decode() method before passing it to the browser. -
The
reload_page()
function uses the selenium library to launch a headless Firefox browser and load the page content obtained from get_page_content(). Thetime.sleep()
method is used to give the page enough time to fully load before the next reload. The driver.title property is used to obtain the title of the page, which includes the name of the GitHub user whose profile is being simulated. -
The Streamlit app allows users to enter the URL of the GitHub profile they want to simulate views for and the number of views they want to simulate. The input fields are created using the
text_input()
andnumber_input()
methods respectively. The app also includes a check to ensure that a valid URL is entered before the simulation begins. -
The script can be further customized to include additional features, such as a delay between each reload or the ability to specify a different browser or driver. It can also be adapted to simulate views on other websites besides GitHub.
- Clone the repository to your local machine.
- Install the required libraries by running
pip install -r requirements.txt
in your terminal. - Run the script by executing
streamlit run app.py
in your terminal. - Enter the URL of the GitHub profile you want to simulate views for in the text input field.
- Enter the number of views you want to simulate in the number input field.
- Click the "Reload" button to start simulating the views.