Hello all...Can u please help me to clear error in this code...
import urllib.request as u import bs4 from urllib.request import Request ,urlopen req =Request("https://in. investing.com/cripto/bitcoin/historical-data",headers={'User-Agent':'Mozilla/5.0'}) y = urlopen(req) soup=bs.4Beautifulsoup,(y,"html,parser") for n in soup(["script","style"]): n.extract() td=Soup.final_all("td") c=[] for K in td: z=(K.get_text()) c.append(z) r=[] for K in range(0,len(c),7): r.append(c[K:K+3]) import x1sxwriter as x wb=x.workbook("one.x1sx") ws=w.badd_worksheet() row=1 ws.write(0,0,"data") ws.write(0,1,"highest") ws.write(0,2,"lowest") for re in range(len(r)): for n in range(3): ws.write(row,n,r[re][n]) row+=1 wb.close() for K in td: z=(k.get_text()) c.append(z) r=[] for K in range(0,len(c),7): r.append(c[k:k+3]) import x1sxwriter as x wb=x.workbook("1.xlsx") ws=wb.add_worksheet() row=1 ws.write(0,0,"date") ws.write(0,1,"highest") ws.write(0,2,"lowest") for re in range (len(r)): for n in range(3): ws.write(row,n,r[re][n])