Created
May 21, 2016 00:56
-
-
Save t3h2mas/25aaa34a33ba621ee5dab25fbfca17c9 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
from bs4 import BeautifulSoup | |
from sys import argv | |
import requests | |
def brownie_points(user): | |
base_url = 'https://freecodecamp.com/' | |
res = requests.get(base_url + user) | |
soup = BeautifulSoup(res.text, 'html.parser') | |
points = soup.select('h1.text-primary') | |
return points[0].string | |
def main(): | |
print brownie_points(argv[1]) | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment