pdf = pyPdf.PdfFileReader(f)
pgs = pdf.getNumPages()
key = '/Annots'
uri = '/URI'
ank = '/A'
for pg in range(pgs):
    p = pdf.getPage(pg)
o = p.getObject()
if key in o:
    ann = o[key]
for a in ann:
    u = a.getObject()
if uri in u[ank]:
    pass
Extracting links to pages in another PDF from PDF using Python or other method