Skip to content

Instantly share code, notes, and snippets.

@fxxntrbl
Created August 8, 2020 11:51
Show Gist options
  • Save fxxntrbl/727a06d65e480fc854b18261637b7dcb to your computer and use it in GitHub Desktop.
Save fxxntrbl/727a06d65e480fc854b18261637b7dcb to your computer and use it in GitHub Desktop.
Bugs Title 크롤링
import requests
from bs4 import BeautifulSoup
d = requests.get("https://music.bugs.co.kr/chart/track/day/total?chartdate=20190303")
d = d.text
soup = BeautifulSoup(d, 'html.parser')
data1 = soup.select('#CHARTday > table > tbody > tr:nth-child(1)')
for a in soup.find_all('p', {"class" : "title"}):
print(a.find('a').text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment