python beautiful soup parse string that has only closing br tag












0















html="""<div class="practice-location">
<strong>Primary Location of Practice</strong><br/>
Suite 100<br/>2010 Eglinton Avenue West<br/>Toronto ON  M6E 2K3<br/><strong>
</div>"""


I have problem extracting address.



I want a string to look like



mystr=Suite 100,2010 Eglinton Avenue West, Toronto ON  M6E 2K3


My Code:



   dt = soup.find(class_ ={"practice-location"})
print dt
ele=dt.find_all('strong')
print ele
add=
for x in ele.find_next_siblings(text=True):
add.append(x.text)
location=','.join(add)
print location









share|improve this question




















  • 1





    can you provide the code that does the request for this particular html? or is it a local html file?

    – chitown88
    Nov 28 '18 at 8:20











  • sorry I forgot the 8 spaces while asking the question

    – Gyan Dixit
    Nov 28 '18 at 8:27











  • I am sorry guys. This is a problem when someone switches from perl to python.

    – Gyan Dixit
    Nov 28 '18 at 8:38
















0















html="""<div class="practice-location">
<strong>Primary Location of Practice</strong><br/>
Suite 100<br/>2010 Eglinton Avenue West<br/>Toronto ON  M6E 2K3<br/><strong>
</div>"""


I have problem extracting address.



I want a string to look like



mystr=Suite 100,2010 Eglinton Avenue West, Toronto ON  M6E 2K3


My Code:



   dt = soup.find(class_ ={"practice-location"})
print dt
ele=dt.find_all('strong')
print ele
add=
for x in ele.find_next_siblings(text=True):
add.append(x.text)
location=','.join(add)
print location









share|improve this question




















  • 1





    can you provide the code that does the request for this particular html? or is it a local html file?

    – chitown88
    Nov 28 '18 at 8:20











  • sorry I forgot the 8 spaces while asking the question

    – Gyan Dixit
    Nov 28 '18 at 8:27











  • I am sorry guys. This is a problem when someone switches from perl to python.

    – Gyan Dixit
    Nov 28 '18 at 8:38














0












0








0








html="""<div class="practice-location">
<strong>Primary Location of Practice</strong><br/>
Suite 100<br/>2010 Eglinton Avenue West<br/>Toronto ON  M6E 2K3<br/><strong>
</div>"""


I have problem extracting address.



I want a string to look like



mystr=Suite 100,2010 Eglinton Avenue West, Toronto ON  M6E 2K3


My Code:



   dt = soup.find(class_ ={"practice-location"})
print dt
ele=dt.find_all('strong')
print ele
add=
for x in ele.find_next_siblings(text=True):
add.append(x.text)
location=','.join(add)
print location









share|improve this question
















html="""<div class="practice-location">
<strong>Primary Location of Practice</strong><br/>
Suite 100<br/>2010 Eglinton Avenue West<br/>Toronto ON  M6E 2K3<br/><strong>
</div>"""


I have problem extracting address.



I want a string to look like



mystr=Suite 100,2010 Eglinton Avenue West, Toronto ON  M6E 2K3


My Code:



   dt = soup.find(class_ ={"practice-location"})
print dt
ele=dt.find_all('strong')
print ele
add=
for x in ele.find_next_siblings(text=True):
add.append(x.text)
location=','.join(add)
print location






python parsing beautifulsoup






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 28 '18 at 8:34









Pureferret

3,300954109




3,300954109










asked Nov 28 '18 at 8:17









Gyan DixitGyan Dixit

43




43








  • 1





    can you provide the code that does the request for this particular html? or is it a local html file?

    – chitown88
    Nov 28 '18 at 8:20











  • sorry I forgot the 8 spaces while asking the question

    – Gyan Dixit
    Nov 28 '18 at 8:27











  • I am sorry guys. This is a problem when someone switches from perl to python.

    – Gyan Dixit
    Nov 28 '18 at 8:38














  • 1





    can you provide the code that does the request for this particular html? or is it a local html file?

    – chitown88
    Nov 28 '18 at 8:20











  • sorry I forgot the 8 spaces while asking the question

    – Gyan Dixit
    Nov 28 '18 at 8:27











  • I am sorry guys. This is a problem when someone switches from perl to python.

    – Gyan Dixit
    Nov 28 '18 at 8:38








1




1





can you provide the code that does the request for this particular html? or is it a local html file?

– chitown88
Nov 28 '18 at 8:20





can you provide the code that does the request for this particular html? or is it a local html file?

– chitown88
Nov 28 '18 at 8:20













sorry I forgot the 8 spaces while asking the question

– Gyan Dixit
Nov 28 '18 at 8:27





sorry I forgot the 8 spaces while asking the question

– Gyan Dixit
Nov 28 '18 at 8:27













I am sorry guys. This is a problem when someone switches from perl to python.

– Gyan Dixit
Nov 28 '18 at 8:38





I am sorry guys. This is a problem when someone switches from perl to python.

– Gyan Dixit
Nov 28 '18 at 8:38












2 Answers
2






active

oldest

votes


















1














use .extract() to remove tag and .replace_with to replace tag



from bs4 import BeautifulSoup

html="""<div class="practice-location">
<strong>Primary Location of Practice</strong><br/>
Suite 100<br/>2010 Eglinton Avenue West<br/>Toronto ON  M6E 2K3<br/><strong>
</div>"""

soup = BeautifulSoup(html, 'html.parser')
dt = soup.find(class_ ={"practice-location"})
# remove "strong" here
dt.strong.extract()
for br in dt.select('br'):
br.replace_with(', ')
print(dt.text.strip().strip(',').strip())

# Suite 100, 2010 Eglinton Avenue West, Toronto ON  M6E 2K3


about 3x strip(), after <br> replaced with the , it will produce string



, 
Suite 100, 2010 Eglinton Avenue West, Toronto ON  M6E 2K3,


first .strip() remove space and new line, second remove comma, and third replace again space and newline.






share|improve this answer


























  • Thanks ewwink it worked . Great .

    – Gyan Dixit
    Nov 28 '18 at 16:12











  • if you could explain dt.text.strip().strip(',').strip() it would be immense help to all

    – Gyan Dixit
    Nov 28 '18 at 16:25











  • edited the answer why I need 3x strip()

    – ewwink
    Nov 28 '18 at 22:52



















0














you could just do .text or .extract, but I was thinking you wanted them seperated with ','



this will do that.



from bs4 import BeautifulSoup, Tag   



def split_at_br(text):
string = ''
for x in text:

if isinstance(x, str) and 'n' not in x:
string += x

if isinstance(x, str) and 'n' in x:
x = x.split('n')
x_temp =
for ele in x:
ele = ele.strip()
x_temp.append(ele)
x = ' '.join(x_temp)
x = x.strip()
string += x

if isinstance(x, Tag):
if x.name != 'br':
x = x.text
string += x
else:
x = ','
string += x

string = string[:-2].strip()
return string


gives output:



html="""<div class="practice-location">
<strong>Primary Location of Practice</strong><br/>
Suite 100<br/>2010 Eglinton Avenue West<br/>Toronto ON  M6E 2K3<br/><strong>
</div>"""

soup = BeautifulSoup(html, 'html.parser')

text = soup.select('div.practice-location')
text = text[0].contents

mystr = split_at_br(text)


then



In [1]: print (mystr)
Primary Location of Practice,Suite 100,2010 Eglinton Avenue West,Toronto ON  M6E 2K3





share|improve this answer


























  • Thanks chitown88 . I tried your code in mine but it gave me some output as Primary Location of Practice,,,,Phone:,Fax:,Electoral District

    – Gyan Dixit
    Nov 28 '18 at 16:17













  • ah ok. that just means that additional info (Phone: Fax:, etc.) are part of the html in those tags. I was under the impression they all followed the same format. So could be a little trickier to factor that as well. but not impossible

    – chitown88
    Nov 28 '18 at 16:23











  • Thanks everybody . I now a new problem. In some strings I have address,phone,fax and some only have address. I wan't them in three different variables. I don't wanna use regex for this or may be only a little regex. Thanks for the help.

    – Gyan Dixit
    Nov 28 '18 at 17:15











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53514929%2fpython-beautiful-soup-parse-string-that-has-only-closing-br-tag%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














use .extract() to remove tag and .replace_with to replace tag



from bs4 import BeautifulSoup

html="""<div class="practice-location">
<strong>Primary Location of Practice</strong><br/>
Suite 100<br/>2010 Eglinton Avenue West<br/>Toronto ON  M6E 2K3<br/><strong>
</div>"""

soup = BeautifulSoup(html, 'html.parser')
dt = soup.find(class_ ={"practice-location"})
# remove "strong" here
dt.strong.extract()
for br in dt.select('br'):
br.replace_with(', ')
print(dt.text.strip().strip(',').strip())

# Suite 100, 2010 Eglinton Avenue West, Toronto ON  M6E 2K3


about 3x strip(), after <br> replaced with the , it will produce string



, 
Suite 100, 2010 Eglinton Avenue West, Toronto ON  M6E 2K3,


first .strip() remove space and new line, second remove comma, and third replace again space and newline.






share|improve this answer


























  • Thanks ewwink it worked . Great .

    – Gyan Dixit
    Nov 28 '18 at 16:12











  • if you could explain dt.text.strip().strip(',').strip() it would be immense help to all

    – Gyan Dixit
    Nov 28 '18 at 16:25











  • edited the answer why I need 3x strip()

    – ewwink
    Nov 28 '18 at 22:52
















1














use .extract() to remove tag and .replace_with to replace tag



from bs4 import BeautifulSoup

html="""<div class="practice-location">
<strong>Primary Location of Practice</strong><br/>
Suite 100<br/>2010 Eglinton Avenue West<br/>Toronto ON  M6E 2K3<br/><strong>
</div>"""

soup = BeautifulSoup(html, 'html.parser')
dt = soup.find(class_ ={"practice-location"})
# remove "strong" here
dt.strong.extract()
for br in dt.select('br'):
br.replace_with(', ')
print(dt.text.strip().strip(',').strip())

# Suite 100, 2010 Eglinton Avenue West, Toronto ON  M6E 2K3


about 3x strip(), after <br> replaced with the , it will produce string



, 
Suite 100, 2010 Eglinton Avenue West, Toronto ON  M6E 2K3,


first .strip() remove space and new line, second remove comma, and third replace again space and newline.






share|improve this answer


























  • Thanks ewwink it worked . Great .

    – Gyan Dixit
    Nov 28 '18 at 16:12











  • if you could explain dt.text.strip().strip(',').strip() it would be immense help to all

    – Gyan Dixit
    Nov 28 '18 at 16:25











  • edited the answer why I need 3x strip()

    – ewwink
    Nov 28 '18 at 22:52














1












1








1







use .extract() to remove tag and .replace_with to replace tag



from bs4 import BeautifulSoup

html="""<div class="practice-location">
<strong>Primary Location of Practice</strong><br/>
Suite 100<br/>2010 Eglinton Avenue West<br/>Toronto ON  M6E 2K3<br/><strong>
</div>"""

soup = BeautifulSoup(html, 'html.parser')
dt = soup.find(class_ ={"practice-location"})
# remove "strong" here
dt.strong.extract()
for br in dt.select('br'):
br.replace_with(', ')
print(dt.text.strip().strip(',').strip())

# Suite 100, 2010 Eglinton Avenue West, Toronto ON  M6E 2K3


about 3x strip(), after <br> replaced with the , it will produce string



, 
Suite 100, 2010 Eglinton Avenue West, Toronto ON  M6E 2K3,


first .strip() remove space and new line, second remove comma, and third replace again space and newline.






share|improve this answer















use .extract() to remove tag and .replace_with to replace tag



from bs4 import BeautifulSoup

html="""<div class="practice-location">
<strong>Primary Location of Practice</strong><br/>
Suite 100<br/>2010 Eglinton Avenue West<br/>Toronto ON  M6E 2K3<br/><strong>
</div>"""

soup = BeautifulSoup(html, 'html.parser')
dt = soup.find(class_ ={"practice-location"})
# remove "strong" here
dt.strong.extract()
for br in dt.select('br'):
br.replace_with(', ')
print(dt.text.strip().strip(',').strip())

# Suite 100, 2010 Eglinton Avenue West, Toronto ON  M6E 2K3


about 3x strip(), after <br> replaced with the , it will produce string



, 
Suite 100, 2010 Eglinton Avenue West, Toronto ON  M6E 2K3,


first .strip() remove space and new line, second remove comma, and third replace again space and newline.







share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 28 '18 at 22:51

























answered Nov 28 '18 at 9:00









ewwinkewwink

12.1k22440




12.1k22440













  • Thanks ewwink it worked . Great .

    – Gyan Dixit
    Nov 28 '18 at 16:12











  • if you could explain dt.text.strip().strip(',').strip() it would be immense help to all

    – Gyan Dixit
    Nov 28 '18 at 16:25











  • edited the answer why I need 3x strip()

    – ewwink
    Nov 28 '18 at 22:52



















  • Thanks ewwink it worked . Great .

    – Gyan Dixit
    Nov 28 '18 at 16:12











  • if you could explain dt.text.strip().strip(',').strip() it would be immense help to all

    – Gyan Dixit
    Nov 28 '18 at 16:25











  • edited the answer why I need 3x strip()

    – ewwink
    Nov 28 '18 at 22:52

















Thanks ewwink it worked . Great .

– Gyan Dixit
Nov 28 '18 at 16:12





Thanks ewwink it worked . Great .

– Gyan Dixit
Nov 28 '18 at 16:12













if you could explain dt.text.strip().strip(',').strip() it would be immense help to all

– Gyan Dixit
Nov 28 '18 at 16:25





if you could explain dt.text.strip().strip(',').strip() it would be immense help to all

– Gyan Dixit
Nov 28 '18 at 16:25













edited the answer why I need 3x strip()

– ewwink
Nov 28 '18 at 22:52





edited the answer why I need 3x strip()

– ewwink
Nov 28 '18 at 22:52













0














you could just do .text or .extract, but I was thinking you wanted them seperated with ','



this will do that.



from bs4 import BeautifulSoup, Tag   



def split_at_br(text):
string = ''
for x in text:

if isinstance(x, str) and 'n' not in x:
string += x

if isinstance(x, str) and 'n' in x:
x = x.split('n')
x_temp =
for ele in x:
ele = ele.strip()
x_temp.append(ele)
x = ' '.join(x_temp)
x = x.strip()
string += x

if isinstance(x, Tag):
if x.name != 'br':
x = x.text
string += x
else:
x = ','
string += x

string = string[:-2].strip()
return string


gives output:



html="""<div class="practice-location">
<strong>Primary Location of Practice</strong><br/>
Suite 100<br/>2010 Eglinton Avenue West<br/>Toronto ON  M6E 2K3<br/><strong>
</div>"""

soup = BeautifulSoup(html, 'html.parser')

text = soup.select('div.practice-location')
text = text[0].contents

mystr = split_at_br(text)


then



In [1]: print (mystr)
Primary Location of Practice,Suite 100,2010 Eglinton Avenue West,Toronto ON  M6E 2K3





share|improve this answer


























  • Thanks chitown88 . I tried your code in mine but it gave me some output as Primary Location of Practice,,,,Phone:,Fax:,Electoral District

    – Gyan Dixit
    Nov 28 '18 at 16:17













  • ah ok. that just means that additional info (Phone: Fax:, etc.) are part of the html in those tags. I was under the impression they all followed the same format. So could be a little trickier to factor that as well. but not impossible

    – chitown88
    Nov 28 '18 at 16:23











  • Thanks everybody . I now a new problem. In some strings I have address,phone,fax and some only have address. I wan't them in three different variables. I don't wanna use regex for this or may be only a little regex. Thanks for the help.

    – Gyan Dixit
    Nov 28 '18 at 17:15
















0














you could just do .text or .extract, but I was thinking you wanted them seperated with ','



this will do that.



from bs4 import BeautifulSoup, Tag   



def split_at_br(text):
string = ''
for x in text:

if isinstance(x, str) and 'n' not in x:
string += x

if isinstance(x, str) and 'n' in x:
x = x.split('n')
x_temp =
for ele in x:
ele = ele.strip()
x_temp.append(ele)
x = ' '.join(x_temp)
x = x.strip()
string += x

if isinstance(x, Tag):
if x.name != 'br':
x = x.text
string += x
else:
x = ','
string += x

string = string[:-2].strip()
return string


gives output:



html="""<div class="practice-location">
<strong>Primary Location of Practice</strong><br/>
Suite 100<br/>2010 Eglinton Avenue West<br/>Toronto ON  M6E 2K3<br/><strong>
</div>"""

soup = BeautifulSoup(html, 'html.parser')

text = soup.select('div.practice-location')
text = text[0].contents

mystr = split_at_br(text)


then



In [1]: print (mystr)
Primary Location of Practice,Suite 100,2010 Eglinton Avenue West,Toronto ON  M6E 2K3





share|improve this answer


























  • Thanks chitown88 . I tried your code in mine but it gave me some output as Primary Location of Practice,,,,Phone:,Fax:,Electoral District

    – Gyan Dixit
    Nov 28 '18 at 16:17













  • ah ok. that just means that additional info (Phone: Fax:, etc.) are part of the html in those tags. I was under the impression they all followed the same format. So could be a little trickier to factor that as well. but not impossible

    – chitown88
    Nov 28 '18 at 16:23











  • Thanks everybody . I now a new problem. In some strings I have address,phone,fax and some only have address. I wan't them in three different variables. I don't wanna use regex for this or may be only a little regex. Thanks for the help.

    – Gyan Dixit
    Nov 28 '18 at 17:15














0












0








0







you could just do .text or .extract, but I was thinking you wanted them seperated with ','



this will do that.



from bs4 import BeautifulSoup, Tag   



def split_at_br(text):
string = ''
for x in text:

if isinstance(x, str) and 'n' not in x:
string += x

if isinstance(x, str) and 'n' in x:
x = x.split('n')
x_temp =
for ele in x:
ele = ele.strip()
x_temp.append(ele)
x = ' '.join(x_temp)
x = x.strip()
string += x

if isinstance(x, Tag):
if x.name != 'br':
x = x.text
string += x
else:
x = ','
string += x

string = string[:-2].strip()
return string


gives output:



html="""<div class="practice-location">
<strong>Primary Location of Practice</strong><br/>
Suite 100<br/>2010 Eglinton Avenue West<br/>Toronto ON  M6E 2K3<br/><strong>
</div>"""

soup = BeautifulSoup(html, 'html.parser')

text = soup.select('div.practice-location')
text = text[0].contents

mystr = split_at_br(text)


then



In [1]: print (mystr)
Primary Location of Practice,Suite 100,2010 Eglinton Avenue West,Toronto ON  M6E 2K3





share|improve this answer















you could just do .text or .extract, but I was thinking you wanted them seperated with ','



this will do that.



from bs4 import BeautifulSoup, Tag   



def split_at_br(text):
string = ''
for x in text:

if isinstance(x, str) and 'n' not in x:
string += x

if isinstance(x, str) and 'n' in x:
x = x.split('n')
x_temp =
for ele in x:
ele = ele.strip()
x_temp.append(ele)
x = ' '.join(x_temp)
x = x.strip()
string += x

if isinstance(x, Tag):
if x.name != 'br':
x = x.text
string += x
else:
x = ','
string += x

string = string[:-2].strip()
return string


gives output:



html="""<div class="practice-location">
<strong>Primary Location of Practice</strong><br/>
Suite 100<br/>2010 Eglinton Avenue West<br/>Toronto ON  M6E 2K3<br/><strong>
</div>"""

soup = BeautifulSoup(html, 'html.parser')

text = soup.select('div.practice-location')
text = text[0].contents

mystr = split_at_br(text)


then



In [1]: print (mystr)
Primary Location of Practice,Suite 100,2010 Eglinton Avenue West,Toronto ON  M6E 2K3






share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 28 '18 at 11:24

























answered Nov 28 '18 at 10:00









chitown88chitown88

4,8871524




4,8871524













  • Thanks chitown88 . I tried your code in mine but it gave me some output as Primary Location of Practice,,,,Phone:,Fax:,Electoral District

    – Gyan Dixit
    Nov 28 '18 at 16:17













  • ah ok. that just means that additional info (Phone: Fax:, etc.) are part of the html in those tags. I was under the impression they all followed the same format. So could be a little trickier to factor that as well. but not impossible

    – chitown88
    Nov 28 '18 at 16:23











  • Thanks everybody . I now a new problem. In some strings I have address,phone,fax and some only have address. I wan't them in three different variables. I don't wanna use regex for this or may be only a little regex. Thanks for the help.

    – Gyan Dixit
    Nov 28 '18 at 17:15



















  • Thanks chitown88 . I tried your code in mine but it gave me some output as Primary Location of Practice,,,,Phone:,Fax:,Electoral District

    – Gyan Dixit
    Nov 28 '18 at 16:17













  • ah ok. that just means that additional info (Phone: Fax:, etc.) are part of the html in those tags. I was under the impression they all followed the same format. So could be a little trickier to factor that as well. but not impossible

    – chitown88
    Nov 28 '18 at 16:23











  • Thanks everybody . I now a new problem. In some strings I have address,phone,fax and some only have address. I wan't them in three different variables. I don't wanna use regex for this or may be only a little regex. Thanks for the help.

    – Gyan Dixit
    Nov 28 '18 at 17:15

















Thanks chitown88 . I tried your code in mine but it gave me some output as Primary Location of Practice,,,,Phone:,Fax:,Electoral District

– Gyan Dixit
Nov 28 '18 at 16:17







Thanks chitown88 . I tried your code in mine but it gave me some output as Primary Location of Practice,,,,Phone:,Fax:,Electoral District

– Gyan Dixit
Nov 28 '18 at 16:17















ah ok. that just means that additional info (Phone: Fax:, etc.) are part of the html in those tags. I was under the impression they all followed the same format. So could be a little trickier to factor that as well. but not impossible

– chitown88
Nov 28 '18 at 16:23





ah ok. that just means that additional info (Phone: Fax:, etc.) are part of the html in those tags. I was under the impression they all followed the same format. So could be a little trickier to factor that as well. but not impossible

– chitown88
Nov 28 '18 at 16:23













Thanks everybody . I now a new problem. In some strings I have address,phone,fax and some only have address. I wan't them in three different variables. I don't wanna use regex for this or may be only a little regex. Thanks for the help.

– Gyan Dixit
Nov 28 '18 at 17:15





Thanks everybody . I now a new problem. In some strings I have address,phone,fax and some only have address. I wan't them in three different variables. I don't wanna use regex for this or may be only a little regex. Thanks for the help.

– Gyan Dixit
Nov 28 '18 at 17:15


















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53514929%2fpython-beautiful-soup-parse-string-that-has-only-closing-br-tag%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Lallio

Futebolista

Jornalista