Toggle navigation
Home
Latest pastes
FAQ
Random
BitBin is shutting down!
Register
Login
SBCODEZCAPER.py
SUBMITTED BY:
Guest
DATE:
Oct. 4, 2014, 7:58 a.m.
FORMAT:
Text only
SIZE:
674 Bytes
Raw
Download
Tweet
HITS:
1188
Go to comments
Report
#!/usr/bin env/python
# Connect to http site using python-requests
# Fetch current posted swagcode and worth from site
# Print swagcodes on screen and worth
from lxml import html
import requests
print 'SBCODEZCAPER.py by SCAREDKID.org - http://scaredkid.org\n'
print 'Donate Dogecoin?\n'
print 'DJhw7i3z7FMpPEN5bMKNXMuxpyeQy9LEY1\n'
page = requests.get('http://sbcodez.com/')
tree = html.fromstring(page.text)
# Get code?
code = tree.xpath('//span[@class="code"]/text()')
# Get worth?
worth = tree.xpath('//span[@class="codeWorth"]/text()')
print 'Codes:', code
print 'Worth:', worth
#EOF
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus