I'm trying to scrape some data from one web page. There are newlines and <br/> tags in the tag text. I want to get only the telephone number on the beginning of the tag. Will you give me an advice how to get only the number?
Here is the HTML code:
<td>
+421 48/471 78 14
<br />
<em>(bowling)</em>
</td>
Is there a way in beautifulsoup to get a text in a tag, but only that text, which is not surrounded by other tags? And the second thing: to get rid of text newlines and html newlines?
I use BS4.
The output would be: '+421 48/471 78 14'
Have you any ideas? Thank you