I have a list of printers and I got their URI using pycups. now I need to know their IP addresses and to do that, I need to know their URL. How can I convert those URIs to URLs? for example, I have this URI: dnssd://HP%20LaserJet%20M402dn%20(0988D9)-0._ipp._tcp.local/ And I need to know the ip address of my printer. how can I do it? when I use socket.gethostbyaddr() to find it, I get an exception that name or service not known
Asked
Active
Viewed 300 times
2
-
2Maybe you could give us some more informations ? And a little bit example code what you are trying ? As far a in know URL is a subset of URI so every URL is a URI ? – Bierbarbar Jul 01 '18 at 10:09
-
for example, I have this URI: dnssd://HP%20LaserJet%20M402dn%20(0988D9)-0._ipp._tcp.local/ And I need to know the ip address of my printer. how can I do it? when I use socket.gethostbyaddr() to find it, I get and exception that name or service not known – Amir Masoud Mostofinejad Jul 01 '18 at 10:28
-
Please, add information as needed or asked for into your question, not just comments. – Ondrej K. Jul 01 '18 at 12:08