from astroquery.vizier import Vizier
import time

cats = None
for attempt in range(5):
    try:
        cats = Vizier.find_catalogs("J/MNRAS/504/2968")
        break
    except Exception as e:
        print("retry find_catalogs", attempt, e)
        time.sleep(5)

for k, v in (cats or {}).items():
    print(k, ":", v.description)

print("=== get_catalogs ===")
Vizier.ROW_LIMIT = -1
for attempt in range(5):
    try:
        tl = Vizier.get_catalogs("J/MNRAS/504/2968")
        break
    except Exception as e:
        print("retry get_catalogs", attempt, e)
        time.sleep(5)

for t in tl:
    print("TABLE:", t.meta.get('name'), "nrows=", len(t))
    print("  cols:", t.colnames)
