I was trying wite the companies name to CSV files. But I am getting the values
what is the error in this code
Letters=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]
url = "https://www.moneycontrol.com/india/stockpricequote/"
global CompanyList=Array{String,1}()
for Letter in Letters
response = HTTP.get(url*Letter)
html = response.body |> String |> parsehtml
elements = eachmatch(sel".bl_12", html.root)
#global CompanyList=Array{String,1}()
for ele in Array{Int,1}(range(3,length(elements)))
try
#println(ele,"========", elements[ele][1].text)
Name=elements[ele].attributes["href"]
println(Name)
df=DataFrame(Companies=Name)
CSV.write("C:\\Users\\Office\\Documents\\Code\\Company.csv",df)
#elements[3][1].text
catch err
if isa(err,BoundsError)
break
end
#for com in range(1:length(CompanyList))
#println(com)
#end
end
end
end
ERROR: ArgumentError: āStringā iterates āCharā values, which donāt satisfy the Tables.jl Row-iterator interface