This project is a Python script that simulates visits to a specified website. It uses random user agents and proxies to make the visits appear as if they are coming from different browsers and IP addresses.
- Simulates website visits using random user agents.
- Supports concurrent visits using multiple threads.
- Uses a list of proxies to simulate visits from different IP addresses.
- Logs visit attempts and results to both a file and the console.
- Python 3.x
requestslibraryfake_useragentlibraryconcurrent.futureslibrary
-
Clone the repository:
git clone https://github.com/yourusername/website-visitor-bot.git cd website-visitor-bot -
Install the required libraries:
pip install requests fake_useragent
-
Edit the webvisit.py file to configure the URL, visit interval, maximum concurrent visits, and proxies.
-
Run the script:
python webvisit.py
-
The script will log visit attempts and results to web_visits.log and the console.
Here is an example of how to configure and run the script:
# Example usage
if __name__ == "__main__":
proxies = [
"http://proxy1.example.com:8080",
"http://proxy2.example.com:8080",
# Add more proxies as needed
]
visitor = WebsiteVisitor(
url="https://www.meetpay.africa",
visit_interval=(10, 15), # Random interval between 10 and 15 seconds
max_concurrent=3, # Maximum concurrent visits
proxies=proxies
)
# Run the visitor with a limit of 5 visits
total_visits, total_errors = visitor.run_visitor(max_visits=5)
print(f"Completed {total_visits} visits with {total_errors} errors.")