Skip to content

Commit

Permalink
update.
Browse files Browse the repository at this point in the history
  • Loading branch information
turbou committed Nov 15, 2023
1 parent 30a487d commit 011ccda
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions work/contrast_rlsnote.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,23 @@ def main():
pubdate = datetime.strptime(pubdate_str, '%B %d, %Y')
#print(id_str, pubdate_str, title)
desc_buffer = []
desc_buffer.append('<ul>')
for elem2 in elem.select('section.section'):
id_str2 = elem2.get("id").strip()
#print('- ', elem2.select_one('div.titlepage').text)
desc_buffer.append('- %s' % elem2.select_one('div.titlepage').text)
desc_buffer.append('<li>%s</li>' % elem2.select_one('div.titlepage').text)
desc_buffer.append('<ul>')
for elem3 in elem2.select('li.listitem'):
#print(' - ', elem3.select_one('p').text)
desc_buffer.append(' - %s' % elem3.select_one('p').text)
desc_buffer.append('<li>%s</li>' % elem3.select_one('p').text)
desc_buffer.append('</ul>')
desc_buffer.append('</ul>')
#print(id_str, elem.get('data-legacy-id'))
#if not title.lower().startswith('java'):
# continue
url = 'https://docs.contrastsecurity.jp/ja/release.html#%s' % id_str
#feed.add_item(title=title, link=url, description=''.join(['<p>{0}</p>'.format(s) for s in desc_buffer]), pubdate=pubdate)
feed.add_item(title=title, link=url, description='<br />'.join(desc_buffer), pubdate=pubdate)
feed.add_item(title=title, link=url, description=''.join(desc_buffer), pubdate=pubdate)
except IndexError:
continue
str_val = feed.writeString('utf-8')
Expand Down

0 comments on commit 011ccda

Please sign in to comment.