Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
BeautifulSoup Parsing Error
#3
Thanks for the reply! It worked, but I also tried downloading the lxml parser and using that, which worked and allowed me to select the specific table I'm interested in:

soup = BeautifulSoup(r.text, 'lxml')
property_table = soup.find_all('table')[3]
The issue I'm stuck with now is that I'm not sure how to extract the text from it. Using

property_table.get_text()
returns mostly text but with a lot of newline ("\n") tags and without formatting. Basically, my question now is this: How do I extract this data nicely into an excel table or .csv format?

Thanks again for your help!
Reply


Messages In This Thread
BeautifulSoup Parsing Error - by slinkplink - Jun-07-2017, 05:12 PM
RE: BeautifulSoup Parsing Error - by nilamo - Jun-07-2017, 05:58 PM
RE: BeautifulSoup Parsing Error - by slinkplink - Jun-07-2017, 09:11 PM
RE: BeautifulSoup Parsing Error - by metulburr - Jun-07-2017, 09:57 PM
RE: BeautifulSoup Parsing Error - by slinkplink - Jun-08-2017, 03:06 PM
RE: BeautifulSoup Parsing Error - by Larz60+ - Jun-08-2017, 08:49 PM
RE: BeautifulSoup Parsing Error - by seco - Feb-12-2018, 02:55 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Strange ModuleNotFound Error on BeautifulSoup for Python 3.11 Gaberson19 1 1,035 Jul-13-2023, 10:38 AM
Last Post: Gaurav_Kumar
  [Solved]Help with BeautifulSoup.getText() Error Extra 5 3,824 Jan-19-2023, 02:03 PM
Last Post: prvncpa
  BeautifulSoup not parsing other URLs giddyhead 0 1,214 Feb-23-2022, 05:35 PM
Last Post: giddyhead
  BeautifulSoup: 6k records - but stops after parsing 20 lines apollo 0 1,828 May-10-2021, 05:08 PM
Last Post: apollo
  Logic behind BeautifulSoup data-parsing jimsxxl 7 4,360 Apr-13-2021, 09:06 AM
Last Post: jimsxxl
  Error with NumPy, BeautifulSoup when using pip tsurubaso 7 5,347 Oct-20-2020, 04:34 PM
Last Post: tsurubaso
  Python beautifulsoup pagination error The61 5 3,507 Apr-09-2020, 09:17 PM
Last Post: Larz60+
  BeautifulSoup: Error while extracting a value from an HTML table kawasso 3 3,261 Aug-25-2019, 01:13 AM
Last Post: kawasso
  beautifulsoup error rudolphyaber 7 5,571 May-26-2019, 02:12 PM
Last Post: heiner55
  Beautifulsoup parsing Larz60+ 7 6,103 Apr-05-2017, 03:07 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020