-
Notifications
You must be signed in to change notification settings - Fork 0
/
项目备注.txt
60 lines (56 loc) · 1.5 KB
/
项目备注.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
pip install -r requirements.txt
#x-www-form-urlencoded
#post
#url = http://127.0.0.1:8000/spider/scrapy
#运行环境 scrapyd,scrapydweb,django,logparser,selenium windows下需要安装pywin32,chromedriver.exe已放于根目录
运行命令
一定要进入进入 ContentSpider : scrapyd
根目录 py manage.py runserver
根目录 scraydweb
进入 ContentSpider : logparser -dir E:/xxx/scrapy_site/ContentSpider/logs
还有两个setting文件的绝对路径
#postman参数json示例
{
"add_time": "2020-04-22",
"allowed_domains": " ",
"cate_id": 4,
"charset": "uft-8",
"id": 1,
"list_xpath": " .//u/li/a/@href",
"rules": [
{
"match": ".//h1[@class=\"main-title\"]/text()",
"name": "title"
},
{
"key": 1587637191655,
"match": ".//div[@class=\"date-source\"]/a[@class=\"source ent-source\"]/text()",
"name": "author",
"value": ""
},
{
"key": 1587637233828,
"match": ".//div[@class=\"channel-path\"]/a[2]/text()",
"name": "tag",
"value": ""
},
{
"key": 1587637245922,
"match": ".//div[@id=\"artibody\"]",
"name": "content",
"value": ""
},
{
"key": 1587637281180,
"match": ".//div[@class=\"date-source\"]/span[@class=\"date\"]/text()",
"name": "create_time",
"value": ""
}
],
"spider_name": "新浪体育中超列表爬虫",
"start_urls": "http://sports.sina.com.cn/csl/",
"update_time": "2020-04-22",
"url_contain": " ",
"url_no_contain": " ",
"url_type": 1
}