from openpyxl import load_workbook
import re
import sys
def cleanText(readData):
p = re.compile("[^0-9]")
#print(p)
#print("".join(p.findall(readData)))
return "".join(p.findall(readData))
def Excel():
wb = load_workbook('newslink_korean.xlsx')
# 현재 Active Sheet 얻기
ws = wb.active
chk="0123456789"
pre = ws.rows
for r in ws.rows: # 엑셀에서 각 행과 열로 순회하기 위함
ty = r[0].value # 첫째 열의 값 : 그룹
data = r[1].value # 둘째 열의 값 : 주소
newslink.append(data)
newslink = []
if __name__ == "__main__":
Excel()
for i in newslink:
print(i)
id= []
newslink = list(newslink)
for e in newslink:
if e != None:
lst = e.split("=")
id.append(lst[1])
for i in id:
print(i)
Youtube Data Tools
Tools - Video Info and Comments
- a tabular file containing basic info and statistics about the video;
- a tabular file containing all retrievable comments, both top level and replies;
- a tabular file containing comment authors and their comment count;
- a network file (gdf format) that maps interactions between users in the comment section;