def get_cited_dois(file):
    if not isinstance(file, list):
        plaintext_citations = get_plaintext_citations(file)
    else:
        plaintext_citations = file
    dois = {}
    crossref_queue = []
    for citation in plaintext_citations[:]:
        matched_dois = doi.extract_from_text(citation)
        if len(matched_dois) > 0:
            dois[citation] = next(iter(matched_dois))
            continue
        matched_arxiv = arxiv.extract_from_text(citation)
        if len(matched_arxiv) > 0:
            dois[citation] = arxiv.to_doi(next(iter(matched_arxiv)))
            continue
        crossref_queue.append(tools.remove_urls(citation))
    for batch in tools.batch(crossref_queue, CROSSREF_MAX_BATCH_SIZE):
        batch = [i for i in batch]
        try:
            request = requests.post(CROSSREF_LINKS_API_URL, json=batch)
            for result in request.json()["results"]:
                try:
                    dois[result["text"]] = result["doi"]
                except KeyError:
                    dois[result["text"]] = None
        except (RequestException, ValueError, KeyError):
            for i in batch:
                dois[i] = None
    return dois