Last active
July 31, 2020 22:04
-
-
Save brnrc/3188393 to your computer and use it in GitHub Desktop.
Script to get a free steam key
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
# Fetches an url and scan the html document for a regex pattern (the STEAM KEY) | |
# monitoring if the KEY changes and copying it to the system's clipboard. | |
# | |
# Output: | |
# CBT2J-R0GID-8FAJI -> 12:20 | |
# K5RJH-86RH7-W0Y2W -> 12:25 | |
# IV37H-83VGQ-MT9BF -> 12:30 | |
# WY2T9-Q35ZV-8LYCX -> 12:35 | |
# MR7BH-RJ3VJ-MADHW -> 12:40 | |
# HBQPD-BFCG7-06577 -> 12:45 | |
# 39PJE-GC8V4-DLFDQ -> 12:50 | |
# Z86PY-THHHR-RMCBG -> 12:55 | |
import re, time, urllib2 | |
# cross-platform copy-to-clipboard | |
# http://coffeeghost.net/2010/10/09/pyperclip-a-cross-platform-clipboard-module-for-python/ | |
# drop it inside your C:\Python27\Lib on Windows. | |
import pyperclip | |
last_code = '' | |
while True: | |
f = urllib2.urlopen('http://www.exosyphen.com/page_10years.html') | |
p = f.readlines() | |
for i in p: | |
if "Newest" in i: | |
code = re.findall(r'[A-Z0-9]+-[A-Z0-9]+-[A-Z0-9]+', i)[0] | |
if code != last_code: | |
print code+' -> '+time.strftime("%H:%M" ,time.localtime( time.time())) | |
pyperclip.copy(code) | |
last_code = code | |
break | |
time.sleep(5) |
No module named pyperclip error
which python version did you used?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
how to use that ?