def get_timestamp(): url = "https://www.drugbank.ca/release_notes" soup = retrieve(url) version_tags = soup.find_all("div", attrs={"class": "card-header"}) if len(version_tags) > 0: version_tag = version_tags[0].text r = version_tag.split() return r[-3] + "," + r[-2] + r[-1] else: return None
def get_timestamp(): url = "https://www.ebi.ac.uk/ols/index" soup = retrieve(url) aside_tag = soup.find('aside') if aside_tag is None or len(aside_tag) == 0: return None date_tag = aside_tag.findChildren('h5') if date_tag is None or len(date_tag) == 0: return None r = date_tag[0].text.split() return r[2] + "," + r[1] + ',' + r[3]
def get_timestamp(): url = "https://reactome.org/" soup = retrieve(url) main_tag = soup.find(id='fav-portfolio1') if main_tag is None or len(main_tag) == 0: return None date_tag = main_tag.findChildren('h3') if date_tag is None or len(date_tag) == 0: return None r = date_tag[0].text.split() return r[-3] + "," + r[-2] + r[-1]
def get_timestamp(): url = "http://www.hmdb.ca/release-notes" soup = retrieve(url) main_tag = soup.find('main') if main_tag is None or len(main_tag) == 0: return None date_tag = main_tag.findChildren('h2') if date_tag is None or len(date_tag) == 0: return None r = date_tag[0].text.split() return r[-2] + "01," + r[-1]
def get_timestamp(): url = "http://www.mirbase.org/" soup = retrieve(url) right_col_tag = soup.find(id='rightColumn') if right_col_tag is None or len(right_col_tag) == 0: return None date_tag = right_col_tag.findChildren('p') if date_tag is None or len(date_tag) == 0: return None r = date_tag[0].text.split() return r[-2] + ",01," + r[-1]
def get_timestamp(): url = "https://www.ncbi.nlm.nih.gov/books/NBK25499/#chapter4.Release_Notes" soup = retrieve(url) main_tag = soup.find(id='chapter4.Release_Notes') if main_tag is None or len(main_tag) == 0: return None date_tag = main_tag.findChildren('h3') if date_tag is None or len(date_tag) == 0: return None r = date_tag[0].text.split() return r[-3] + "," + r[-2] + r[-1]
def get_timestamp(): url = "https://www.genome.jp/kegg/docs/relnote.html" soup = retrieve(url) main_tags = soup.find_all(id="main") if len(main_tags) > 0: main_tag = main_tags[0].text index = main_tag.find("Current release") + len("Current release") r = main_tag[index:].split() if len(r[3]) == 2: r[3] = '0' + r[3] return r[2] + "," + r[3] + r[4] else: return None
def get_timestamp(): url = "http://www.disgenet.org/dbinfo" soup = retrieve(url) version_his_tag = soup.find(id="versionHistory") if version_his_tag: date = version_his_tag.find_next_sibling("p").text r = date.split() if len(r) == 3: if len(r[1]) == 2: r[1] = '0' + r[1] return r[0] + "," + r[1] + r[2] else: return None else: return None
def get_timestamp(): url = "http://www.disease-ontology.org/news/" soup = retrieve(url) content_tag = soup.find(id='content') date_tag = content_tag.findChildren('p')[0] if date_tag: date = date_tag.text.split()[-1] r = date.split('-') if len(r) == 3: d = datetime(int(r[0]), int(r[1]), int(r[2])) return d.strftime("%b,%d,%Y") else: return None else: return None
def get_timestamp(): url = "http://www.dgidb.org/downloads" soup = retrieve(url) footer_tag = soup.find(id="footer") if footer_tag: date_tag = footer_tag.findChildren("p")[0] if date_tag: date = date_tag.text.split()[-1] r = date.split('-') if len(r) == 3: d = datetime(int(r[0]), int(r[1]), int(r[2])) return d.strftime("%b,%d,%Y") else: return None else: return None else: return None
def get_timestamp(): url = "https://chembl.gitbook.io/chembl-interface-documentation/downloads" soup = retrieve(url) tbody_tag = soup.find('tbody') # release date in row 1 col 2 i = 0 for tr in tbody_tag.children: if i == 1: j = 0 for td in tr.children: if j == 2: date = td.text d = date.split() if len(d) == 2: return d[0] + ",01," + d[1] else: return None j += 1 i += 1 return None