From 28d9a59164fedfff866bfd782508c88d92ea4796 Mon Sep 17 00:00:00 2001 From: Vegard Storheil Eriksen Date: Thu, 30 Jun 2011 19:42:31 +0200 Subject: Run AniDB URLs through AniDB module. (untested) --- modules/url_titles.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'modules') 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) -- cgit v1.2.3