Remove mobile platform
This commit is contained in:
@@ -9,7 +9,7 @@ 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=['grrb', 'mobile', 'all'],
|
choices=['grrb', 'mobile', 'all'],
|
||||||
help='选择爬取平台: grrb(工人日报), mobile(移动端), all(全部)')
|
help='选择爬取平台: grrb(工人日报), 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.workercn.cn',
|
'start_url': 'http://www.workercn.cn',
|
||||||
'article_selector': 'a'
|
'article_selector': 'a'
|
||||||
},
|
},
|
||||||
'mobile': {
|
|
||||||
'name': '工人日报移动端',
|
|
||||||
'base_url': 'http://m.workercn.cn', # 修复:确保移动端URL正确
|
|
||||||
'start_url': 'http://m.workercn.cn',
|
|
||||||
'article_selector': 'a'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if platform == 'all':
|
if platform == 'all':
|
||||||
|
|||||||
Reference in New Issue
Block a user