From 50d18e3c2e3a9ec0562293ebad7273844b7f5223 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BD=A6=E4=BA=AE=E4=BA=AE?= Date: Sun, 5 Feb 2017 22:17:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dping=5Fbaidu=E5=91=BD?= =?UTF-8?q?=E4=BB=A4=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- blog/management/commands/ping_baidu.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/blog/management/commands/ping_baidu.py b/blog/management/commands/ping_baidu.py index 6ec8b97..2a99ac6 100644 --- a/blog/management/commands/ping_baidu.py +++ b/blog/management/commands/ping_baidu.py @@ -15,7 +15,7 @@ from django.core.management.base import BaseCommand, CommandError from blog.models import Article, Tag, Category -from DjangoBlog.spider_notify import sipder_notify +from DjangoBlog.spider_notify import spider_notify from django.contrib.sites.models import Site site = Site.objects.get_current().domain @@ -35,7 +35,7 @@ class Command(BaseCommand): def handle(self, *args, **options): type = options['data_type'] self.stdout.write('start get %s' % type) - notify = sipder_notify() + urls = [] if type == 'article' or type == 'all': for article in Article.objects.filter(status='p'): @@ -50,5 +50,5 @@ class Command(BaseCommand): urls.append(self.get_full_url(url)) self.stdout.write(self.style.SUCCESS('start notify %d urls' % len(urls))) - notify.baidu_notify(urls) + spider_notify.baidu_notify(urls) self.stdout.write(self.style.SUCCESS('finish notify'))