Remove mobile platform
This commit is contained in:
@@ -8,8 +8,8 @@ class Command(BaseCommand):
|
|||||||
|
|
||||||
def add_arguments(self, parser):
|
def add_arguments(self, parser):
|
||||||
parser.add_argument('--platform', type=str, default='all',
|
parser.add_argument('--platform', type=str, default='all',
|
||||||
choices=['qizhi', 'mobile', 'all'],
|
choices=['qizhi', 'all'],
|
||||||
help='选择爬取平台: qizhi(旗帜网), mobile(移动端), all(全部)')
|
help='选择爬取平台: qizhi(旗帜网), all(全部)')
|
||||||
|
|
||||||
def handle(self, *args, **options):
|
def handle(self, *args, **options):
|
||||||
platform = options['platform']
|
platform = options['platform']
|
||||||
@@ -22,12 +22,6 @@ class Command(BaseCommand):
|
|||||||
'start_url': 'http://www.qizhiwang.org.cn',
|
'start_url': 'http://www.qizhiwang.org.cn',
|
||||||
'article_selector': 'a[href^="/"]' # 修改选择器以更好地匹配文章链接
|
'article_selector': 'a[href^="/"]' # 修改选择器以更好地匹配文章链接
|
||||||
},
|
},
|
||||||
'mobile': {
|
|
||||||
'name': '旗帜网移动端',
|
|
||||||
'base_url': 'http://m.qizhiwang.org.cn',
|
|
||||||
'start_url': 'http://m.qizhiwang.org.cn',
|
|
||||||
'article_selector': 'a[href^="/"]' # 修改选择器以更好地匹配文章链接
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if platform == 'all':
|
if platform == 'all':
|
||||||
|
|||||||
Reference in New Issue
Block a user