import os import sys sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from plagdetect.oasources import search_core, search_doaj, search_europepmc for fn, nm in [(search_core, "CORE"), (search_europepmc, "EuropePMC"), (search_doaj, "DOAJ")]: try: r = fn("deep learning neural network", n=3) print(f"{nm}: {len(r)} hits") for c in r[:2]: print(f" title={c['title'][:46]!r} year={c.get('year')} " f"doi={(c.get('doi') or '')[:28]!r}") print(f" pdf={bool(c.get('pdf_url'))} " f"text_url={bool(c.get('text_url'))} " f"fulltext_chars={len(c.get('fulltext','') or '')} " f"abstract={bool(c.get('abstract'))}") except Exception as e: print(f"{nm}: ERR {e!r}")