Python HTML source code
<p>I would like to write a script that picks a special point from the source code and returns it. (print it)</p>

<pre><code>import urllib.request                           

Webseite = "http://myip.is/"                    
html_code = urllib.request.urlopen(Webseite)

print(html_code.read().decode('ISO-8859-1'))
</code></pre>

<p>This is my current code.
I would like to print only the IP address that the website gives.
The input of this I will print in python (title="copy ip address").</p>

<p>You can use a regular expression to find the IP addresses:</p>

<pre><code>import urllib.request
import re

Webseite = "http://myip.is/"
html_code = urllib.request.urlopen(Webseite)

content = html_code.read().decode('ISO-8859-1')
ip_regex = r'(?:[0-9]{1,3}\.){3}[0-9]{1,3}'

ips_found = re.findall(ip_regex, content)
print(ips_found[0])
</code></pre>

python python-3.x