Created
July 24, 2015 15:29
-
-
Save pathcl/3f71ae09457f01f3ad2b to your computer and use it in GitHub Desktop.
session-counter.py
This file contains 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
#!/usr/bin/env python | |
import requests | |
import warnings | |
import fixssl | |
import time | |
warnings.filterwarnings("ignore") | |
urls = [ | |
'domain.tld' | |
] | |
while True: | |
for url in urls: | |
s = requests.Session() | |
s.mount('https://', fixssl.FixSSL()) | |
req = s.get(url) | |
count = req.text | |
stats = [] | |
stats.append(count) | |
payload = { 'id' : url[21], 'value': stats} | |
data = requests.get('domain.tld/api', data=payload) | |
time.sleep(0.5) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment