I have a bunch of viral genbank assembly identifiers such as this: 
`['GCA_001041635.1', 'GCA_002958635.1', 'GCA_000915755.1', 'GCA_001041575.1']`

How can I get the actual taxonomic names for these?

My process right now is cumbersome: 
1. Look up assembly ID on NCBI
https://www.ncbi.nlm.nih.gov/assembly/GCF_001041635.1/

2. Click on Related Information -> Taxonomy
https://www.ncbi.nlm.nih.gov/taxonomy?LinkName=assembly_taxonomy&from_uid=4780598

3. Click on the taxon under "Links from Assembly":
https://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?id=1500814

4. Copy "Lineage":
Viruses; Duplodnaviria; Heunggongvirae; Uroviricota; Caudoviricetes; Caudovirales; Siphoviridae; Pahexavirus; Propionibacterium virus PHL095N00

**How can I automate this process?** I made a crude webscraping function but I get locked out and it's not reliable nor is it robust. 

Essentially I'm looking for one of the following approaches:

1. Python module that is either pip or conda installable that has a function: `f(genbank_assembly_id) -> taxonomic_lineage_string` which is probably unlikely. 

2. A flat file that has at least 2 columns where one is Genbank Accession ID and another is lineage.  

Using [EntrezDirect][1]:

    $ esearch -db assembly -query "GCA_001041635" | elink -target taxonomy | efetch -format native -mode xml | grep ScientificName | awk -F ">|<" 'BEGIN{ORS=", ";}{print $3;}'
    Propionibacterium phage PHL095N00, Viruses, Duplodnaviria, Heunggongvirae, Uroviricota, Caudoviricetes, Caudovirales, Siphoviridae, Pahexavirus, Propionibacterium virus PHL095N00,

I will leave crafting a loop to get output described in #2 up to you.


  [1]: https://bit.ly/entrez-direct