You can only get the original TTL by directly querying the authoritative server. This is not Python-specific.
- Find out what the set of authoritative nameservers is by querying for
NS
records for the desired name. If you find no NS records for the name then remove the first label and query again (query the parent domain). Recursively repeat until you get some NS records. - Once you have NS records, query those nameservers directly for the originally requested name. In case one or more of these nameservers doesn't respond, query the next one in the list.
This is basically equivalent to doing part of the job of a recursive resolver.