-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathspecies (2).py
19 lines (9 loc) · 6.5 KB
/
species (2).py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from bs4 import BeautifulSoup
page = '''<div class="row" style="width: 775px;"> <ul class="GNSNAGJBHJ list-unstyled col-md-4"><li><a class="gwt-Anchor" href="#!info?alias=Org_Ahypochondriacus_er">Amaranthus hypochondriacus v1.0</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Atrichopoda">Amborella trichopoda v1.0</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Acomosus_er">Ananas comosus v3</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Acoerulea">Aquilegia coerulea v1.1</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Acoerulea_er">Aquilegia coerulea v3.1</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Ahalleri_er">Arabidopsis halleri v1.1</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Alyrata">Arabidopsis lyrata v1.0</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Athaliana">Arabidopsis thaliana TAIR10</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Bstricta">Boechera stricta v1.2</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Bdistachyon">Brachypodium distachyon v3.1</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Bstacei">Brachypodium stacei v1.1</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_BrapaFPsc">Brassica rapa FPsc v1.3</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Cgrandiflora">Capsella grandiflora v1.1</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Crubella">Capsella rubella v1.0</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Cpapaya">Carica papaya ASGPBv0.4</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Cquinoa_er">Chenopodium quinoa v1.0</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Creinhardtii">Chlamydomonas reinhardtii v5.5</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Cclementina">Citrus clementina v1.0</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Csinensis">Citrus sinensis v1.1</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_CsubellipsoideaC_169">Coccomyxa subellipsoidea C-169 v2.0</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Csativus">Cucumis sativus v1.0</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Dcarota_er">Daucus carota v2.0</a></li></ul> <ul class="GNSNAGJBHJ list-unstyled col-md-4"><li><a class="gwt-Anchor" href="#!info?alias=Org_Dsalina_er">Dunaliella salina v1.0</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Egrandis">Eucalyptus grandis v2.0</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Esalsugineum">Eutrema salsugineum v1.0</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Fvesca">Fragaria vesca v1.1</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Gmax">Glycine max Wm82.a2.v1</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Graimondii">Gossypium raimondii v2.1</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Klaxiflora_er">Kalanchoe laxiflora v1.1</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Kmarnieriana">Kalanchoe marnieriana v1.1</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Lusitatissimum">Linum usitatissimum v1.0</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Mdomestica">Malus domestica v1.0</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Mesculenta">Manihot esculenta v6.1</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Mpolymorpha_er">Marchantia polymorpha v3.1</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Mtruncatula">Medicago truncatula Mt4.0v1</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_MpusillaCCMP1545">Micromonas pusilla CCMP1545 v3.0</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_MspRCC299">Micromonas sp. RCC299 v3.0</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Mguttatus">Mimulus guttatus v2.0</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Macuminata">Musa acuminata v1</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Othomaeum_er">Oropetium thomaeum v1.0</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Osativa">Oryza sativa v7_JGI</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Olucimarinus">Ostreococcus lucimarinus v2.0</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Phallii">Panicum hallii v2.0</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Pvirgatum">Panicum virgatum v1.1</a></li></ul> <ul class="GNSNAGJBHJ list-unstyled col-md-4"><li><a class="gwt-Anchor" href="#!info?alias=Org_Pvirgatum_er">Panicum virgatum v3.1</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Pvulgaris">Phaseolus vulgaris v1.0</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Ppatens">Physcomitrella patens v3.3</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Ptrichocarpa">Populus trichocarpa v3.0</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Ppersica">Prunus persica v2.1</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Rcommunis">Ricinus communis v0.1</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Spurpurea">Salix purpurea v1.0</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Smoellendorffii">Selaginella moellendorffii v1.0</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Sitalica">Setaria italica v2.2</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Sviridis">Setaria viridis v1.1</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Slycopersicum">Solanum lycopersicum iTAG2.3</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Stuberosum">Solanum tuberosum v3.4</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Sbicolor">Sorghum bicolor v3.1</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Sfallax">Sphagnum fallax v0.5</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Spolyrhiza">Spirodela polyrhiza v2</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Tcacao">Theobroma cacao v1.1</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Tpratense_er">Trifolium pratense v2</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Taestivum_er">Triticum aestivum v2.2</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Vvinifera">Vitis vinifera Genoscope.12X</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Vcarteri">Volvox carteri v2.1</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Zmays">Zea mays Ensembl-18</a></li><li><a class="gwt-Anchor" href="#!info?alias=Org_Zmarina_er">Zostera marina v2.2</a></li></ul> </div>'''
slistfile = "P:\\pollen_wall_gene_family\\data\\all_species_in_phytozome.dat"
soup = BeautifulSoup(page,"html.parser")
specieslst= soup.getText("\t").split("\t")
fw = open(slistfile,"w")
for e in specieslst:
fw.write(e+"\n")
fw.close()