Created
July 18, 2016 08:24
-
-
Save jollyjoester/ed4049e18c16c8b1dfeee26e370ca484 to your computer and use it in GitHub Desktop.
teratailのpython月間タグ別ランキングTop10のユーザー名取ってみた #CodePiece #pynyumon
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
#! /usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import urllib.request | |
from bs4 import BeautifulSoup | |
html = urllib.request.urlopen('https://teratail.com/tags/Python') | |
soup = BeautifulSoup(html, 'lxml') | |
userRanking_month = soup.find(id='userRanking__month') | |
topRanker = userRanking_month.find_all(class_='txtUserName') | |
[print(name.string) for name in topRanker] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment