diff options
author | Vegard Storheil Eriksen <zyp@jvnv.net> | 2011-06-30 19:42:31 +0200 |
---|---|---|
committer | Vegard Storheil Eriksen <zyp@jvnv.net> | 2011-06-30 19:42:31 +0200 |
commit | 28d9a59164fedfff866bfd782508c88d92ea4796 (patch) | |
tree | 83f03b89ed2a6531f4f993734ce06c5077150495 | |
parent | 87bad8cac29b480c36ed05b652e5520fd0a1f73c (diff) |
Run AniDB URLs through AniDB module. (untested)
-rw-r--r-- | modules/url_titles.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/url_titles.py b/modules/url_titles.py index eca708f..343ce5c 100644 --- a/modules/url_titles.py +++ b/modules/url_titles.py @@ -58,6 +58,14 @@ class Module: # ignore spotify URLs if 'open.spotify.com' in url: continue + + # Run AniDB URLs through AniDB module. + m = re.match('http://anidb.net/(perl-bin/animedb.pl?show=anime&aid=|a)(\d+)', url) + if m and 'anidb' in self.irc.modules: + aid = int(m.groups()[1]) + titles.append(self.irc.modules['anidb'].get_info(aid)) + continue + t = time.time() try: u = urllib2.urlopen(url) |