Dear All,
This is my first post and im still very new to Python so i will appreciate all the patience and help i can get!
I have made a webscraper, the output of the scraper is a patterned text that I need to convert into an excel table
example of the output i got from the webscraper is:
"A" : "131", "B" :"12234", "C" : "ALPHA", "D" : "122"
"A" : "39" , "B" : "9994", "C" : "ROMEO",
"D" :"12367, "A" : "551", "B" :"13334", "C" : "BETA", "D" : "622
"A" : "679" , "B" : "4234", "C" : "XYZ",
"D" :"999"
.........etc.......
I want to convert the above output into a table as such
Can you please advise which libraries and programming statements/codes i can use to achieve the above?
below is the code i have written so far for your reference:
Soup
This is my first post and im still very new to Python so i will appreciate all the patience and help i can get!
I have made a webscraper, the output of the scraper is a patterned text that I need to convert into an excel table
example of the output i got from the webscraper is:
"A" : "131", "B" :"12234", "C" : "ALPHA", "D" : "122"
"A" : "39" , "B" : "9994", "C" : "ROMEO",
"D" :"12367, "A" : "551", "B" :"13334", "C" : "BETA", "D" : "622
"A" : "679" , "B" : "4234", "C" : "XYZ",
"D" :"999"
.........etc.......
I want to convert the above output into a table as such
Output:A B C D
131 12234 ALPHA 122
39 9994 ROMEO 12367
551 13334 BETA 662
679 4234 XYZ 999
and then feed the above table into an excel file.Can you please advise which libraries and programming statements/codes i can use to achieve the above?
below is the code i have written so far for your reference:
from selenium import webdriver import time driver= webdriver.Chrome(executable_path="C:.....Desktop/chromedriver.exe") driver.get("www.###.com") time.sleep(3) driver.refresh() #ive added a refresh statement so the links in the AJAX(XHR) can be accessed without being blocked time.sleep(3) driver.get ("www.###.com") print (driver.page_source) #this generates the output i have listed aboveBest Regards,
Soup