Skip to content

Instantly share code, notes, and snippets.

@mrtc0
Created March 1, 2015 16:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrtc0/60fdb59dd42d88635ede to your computer and use it in GitHub Desktop.
Save mrtc0/60fdb59dd42d88635ede to your computer and use it in GitHub Desktop.
今日のアニメ確認スクリプト
#!/usr/bin/env python
# coding=utf-8
import feedparser
import datetime
# rss2.php https://sites.google.com/site/syobocal/spec/rss2-php
url = 'http://cal.syoboi.jp/rss2.php?usr=mrtc0&titlefmt=$(Mark)%20[$(ChName)]%20$(Title)%20$(SubTitleB)'
item = feedparser.parse(url)
for entry in item['entries']:
title = entry['title']
time = entry['updated']
t = datetime.datetime.strptime(time, '%Y-%m-%dT%H:%M:%S+09:00')
print u"%s %s " % (t, title)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment