Skip to content

Instantly share code, notes, and snippets.

@t3h2mas
Created May 21, 2016 00:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save t3h2mas/25aaa34a33ba621ee5dab25fbfca17c9 to your computer and use it in GitHub Desktop.
Save t3h2mas/25aaa34a33ba621ee5dab25fbfca17c9 to your computer and use it in GitHub Desktop.
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