Created
July 1, 2015 17:46
-
-
Save myano/33e8c5d5344591cf767e to your computer and use it in GitHub Desktop.
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
def greece(jenni, input): | |
if not input.admin: | |
return jenni.say('Please obtain admin-privs to use this function.') | |
url = 'https://www.indiegogo.com/projects/greek-bailout-fund#/story' | |
try: | |
page = web.get(url) | |
except: | |
return jenni.say('Could not connect to indiegogo.com') | |
find_euros = re.compile(r"<div class='i-balance'><span class=\"currency currency-xlarge\"><span>(\S+)</span><em>EUR</em></span></div>") | |
results = find_euros.findall(page) | |
if results: | |
jenni.say(results[0]) | |
else: | |
jenni.say('Could not find donation amount.') | |
greece.commands = ['greece'] | |
greece.rate = 300 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
saxo style: