Skip to content

Commit

Permalink
차트 출력 1~5위에서 1~3위로 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
B-G-Y committed May 21, 2021
1 parent d30f9e4 commit 825dbb0
Showing 1 changed file with 3 additions and 63 deletions.
66 changes: 3 additions & 63 deletions Music_Chart.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def music():

# HTML 가져오기
if '24H' in input_text:
RANK = 5 ## 멜론 차트 순위 1 ~ 5위까지
RANK = 3 ## 멜론 차트 순위 1 ~ 3위까지

header = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36'}
Expand Down Expand Up @@ -108,26 +108,6 @@ def music():
"webUrl": "https://www.melon.com/song/detail.htm?songId=" + songInfo_Go[2]
# 정보 링크 url
}
},
{
"type": "item",
"imageUrl": imgSrcRank[3],
"title": "4등 " + ChartRankInfo[3], # i=0부터 1등 정보 매겨짐
"linkUrl": {
"type": "OS", # PC나 모바일별 별도 url설정 가능하나 web용으로 동일 적용
"webUrl": "https://www.melon.com/song/detail.htm?songId=" + songInfo_Go[3]
# 정보 링크 url
}
},
{
"type": "item",
"imageUrl": imgSrcRank[4],
"title": "5등 " + ChartRankInfo[4], # i=0부터 1등 정보 매겨짐
"linkUrl": {
"type": "OS", # PC나 모바일별 별도 url설정 가능하나 web용으로 동일 적용
"webUrl": "https://www.melon.com/song/detail.htm?songId=" + songInfo_Go[4]
# 정보 링크 url
}
}
]
}
Expand All @@ -137,7 +117,7 @@ def music():
}

if '일간' in input_text:
RANK = 5 ## 멜론 차트 순위 1 ~ 5위까지
RANK = 3 ## 멜론 차트 순위 1 ~ 3위까지

header = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36'}
Expand Down Expand Up @@ -225,26 +205,6 @@ def music():
"webUrl": "https://www.melon.com/song/detail.htm?songId=" + songInfo_Go[2]
# 정보 링크 url
}
},
{
"type": "item",
"imageUrl": imgSrcRank[3],
"title": "4등 " + ChartRankInfo[3], # i=0부터 1등 정보 매겨짐
"linkUrl": {
"type": "OS", # PC나 모바일별 별도 url설정 가능하나 web용으로 동일 적용
"webUrl": "https://www.melon.com/song/detail.htm?songId=" + songInfo_Go[3]
# 정보 링크 url
}
},
{
"type": "item",
"imageUrl": imgSrcRank[4],
"title": "5등 " + ChartRankInfo[4], # i=0부터 1등 정보 매겨짐
"linkUrl": {
"type": "OS", # PC나 모바일별 별도 url설정 가능하나 web용으로 동일 적용
"webUrl": "https://www.melon.com/song/detail.htm?songId=" + songInfo_Go[4]
# 정보 링크 url
}
}
]
}
Expand All @@ -254,7 +214,7 @@ def music():
}

if '주간' in input_text:
RANK = 5 ## 멜론 차트 순위 1 ~ 5위까지
RANK = 3 ## 멜론 차트 순위 1 ~ 3위까지

header = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36'}
Expand Down Expand Up @@ -342,26 +302,6 @@ def music():
"webUrl": "https://www.melon.com/song/detail.htm?songId=" + songInfo_Go[2]
# 정보 링크 url
}
},
{
"type": "item",
"imageUrl": imgSrcRank[3],
"title": "4등 " + ChartRankInfo[3], # i=0부터 1등 정보 매겨짐
"linkUrl": {
"type": "OS", # PC나 모바일별 별도 url설정 가능하나 web용으로 동일 적용
"webUrl": "https://www.melon.com/song/detail.htm?songId=" + songInfo_Go[3]
# 정보 링크 url
}
},
{
"type": "item",
"imageUrl": imgSrcRank[4],
"title": "5등 " + ChartRankInfo[4], # i=0부터 1등 정보 매겨짐
"linkUrl": {
"type": "OS", # PC나 모바일별 별도 url설정 가능하나 web용으로 동일 적용
"webUrl": "https://www.melon.com/song/detail.htm?songId=" + songInfo_Go[4]
# 정보 링크 url
}
}
]
}
Expand Down

0 comments on commit 825dbb0

Please sign in to comment.