1

First time working web scrapping with python selenium, Here is the html I am working on

           <div class="Building-locate-sorting">
            <strong>Building Number:</strong> 2828285<br>
            <strong>Building Name:</strong> Staten<br>
            <strong>Entry Date:</strong> 07/01/2019<br>
            <strong>Exit Date:</strong> 06/30/2022<br>
            <strong>DockingTerm Terms:</strong> 2 Eleveator,$50lat<br>
        </div>

and in my code I am pulling the code as

location = driver.find_elements_by_xpath("//td[contains(@class,'Building-locate-sorting')]")

and what I really want is to get the values as dataframe/table format

BuildingNO|BuildingName|EntryDate|ExitDate 
   2828285|Staten      |7/1/2019 | 6/30/2022

I am stuck as all my output are one long values such as

( Building Number : 2828285 Building Name : Staten .....)

Any help I greatly appreciate it. Thank you

  • have you tried if [pandas DataFrame](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html) will work? – 0m3r Jun 09 '22 at 21:56
  • Does this answer your question? [Trying to scrape table using Pandas from Selenium's result](https://stackoverflow.com/questions/45394374/trying-to-scrape-table-using-pandas-from-seleniums-result) – AlexK Jun 09 '22 at 22:07
  • pd.read_html is not really returning anything.. – user2746986 Jun 10 '22 at 16:18

0 Answers0