0

I have a list of FQDNs and would need to get the url it points to using python. Any pointers about how I could achieve this?

Added http:// as suggested by @tetech it is giving this error:

requests.exceptions.ConnectionError: HTTPConnectionPool(host='edge-mqtt-shv-01-any2.facebook.com', port=80): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f9b534ad7f0>: Failed to establish a new connection: [Errno 111] Connection refused',)

Used this code:

import requests
requests.get("http://edge-mqtt-shv-01-any2.facebook.com")
10
  • 1
    The FQDN is part of the URL. So what are you trying to do ? What did you already try ? Commented Sep 9, 2020 at 6:22
  • Ok, I am trying to crawl the website whose fqdn I have. Commented Sep 9, 2020 at 6:25
  • The fqdn is something like this: edge-mqtt-shv-01-any2.facebook.com Commented Sep 9, 2020 at 6:33
  • Add http:// to the start Commented Sep 9, 2020 at 6:41
  • 2
    Then there's no service running on port 80. Add https:// instead. I somehow think this isn't being done as part of a business IT environment. Commented Sep 9, 2020 at 7:00

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.