|
@@ -0,0 +1,11 @@
|
|
1
|
+import requests
|
|
2
|
+from bs4 import BeautifulSoup # BeautifulSoup import
|
|
3
|
+
|
|
4
|
+response = requests.get('http://gevolution.co.kr/rank/aos')
|
|
5
|
+html = response.text
|
|
6
|
+soup = BeautifulSoup(html, 'html.parser') # html.parser를 사용해서 soup에 넣겠다
|
|
7
|
+ranking = 1
|
|
8
|
+for tag in soup.select('div[class=item-info] div[class=grp] span[class=rank1] a'):
|
|
9
|
+ url = tag.get('href')
|
|
10
|
+ print("\n" + str(ranking) + '위 : ' + tag.text.strip())
|
|
11
|
+ ranking = ranking + 1
|