Python Forum
Preserving anchor tags in BeautifulSoup
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Preserving anchor tags in BeautifulSoup
#7
Update:

Just fixed it i did:

body_with_html = ''.join(str(c) for c in soup.find('taskBody').children)
Which seems to keep the html intact.

Thank you for the help guys!
Reply


Messages In This Thread
RE: Preserving anchor tags in BeautifulSoup - by graham23s - May-19-2019, 09:16 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  BeautifulSoup - I can't translate html tags that contain <a href=..</a> OR <em></em> Melcu54 10 1,777 Oct-27-2022, 08:58 AM
Last Post: wavic
  Loop through tags inside tags in Selenium/Python xpack24 1 5,792 Oct-23-2019, 10:15 AM
Last Post: Larz60+
  remove tags from BeautifulSoup result moski 1 4,757 Jun-05-2019, 01:47 PM
Last Post: heiner55

Forum Jump:

User Panel Messages

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