Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
crawler
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chengyang Zhong
crawler
Commits
071ea91d
Commit
071ea91d
authored
Aug 07, 2020
by
litaolemo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
1f2ea02a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
search_page_single_process.py
crawler_sys/framework/search_page_single_process.py
+6
-5
zhihu.js
crawler_sys/site_crawler/zhihu.js
+0
-0
No files found.
crawler_sys/framework/search_page_single_process.py
View file @
071ea91d
...
@@ -16,7 +16,7 @@ PARSER = argparse.ArgumentParser(description='video platform search page crawler
...
@@ -16,7 +16,7 @@ PARSER = argparse.ArgumentParser(description='video platform search page crawler
# '/crawler_sys/framework/config'
# '/crawler_sys/framework/config'
# '/search_keywords.ini'),
# '/search_keywords.ini'),
# help=('config file absolute path'))
# help=('config file absolute path'))
PARSER
.
add_argument
(
'-p'
,
'--platform'
,
default
=
[
"toutiao"
,
"weibo"
,
"zhihu"
],
action
=
'append'
,
PARSER
.
add_argument
(
'-p'
,
'--platform'
,
default
=
[],
action
=
'append'
,
help
=
(
'legal platform name is required'
))
help
=
(
'legal platform name is required'
))
PARSER
.
add_argument
(
'-k'
,
'--key_word_platform'
,
default
=
[],
action
=
'append'
,
PARSER
.
add_argument
(
'-k'
,
'--key_word_platform'
,
default
=
[],
action
=
'append'
,
help
=
(
'key_word_legal platform name is required'
))
help
=
(
'key_word_legal platform name is required'
))
...
@@ -26,13 +26,13 @@ PARSER.add_argument('-g', '--output_to_es_register', default=True,
...
@@ -26,13 +26,13 @@ PARSER.add_argument('-g', '--output_to_es_register', default=True,
help
=
(
'output to es register'
))
help
=
(
'output to es register'
))
PARSER
.
add_argument
(
'-n'
,
'--maxpage'
,
default
=
20
,
PARSER
.
add_argument
(
'-n'
,
'--maxpage'
,
default
=
20
,
help
=
(
'maxpage'
))
help
=
(
'maxpage'
))
PARSER
.
add_argument
(
'-px'
,
'--proxies_num'
,
default
=
3
,
help
=
(
'proxies_num'
))
ARGS
=
PARSER
.
parse_args
()
ARGS
=
PARSER
.
parse_args
()
if
ARGS
.
platform
!=
[]:
PLATFORM_LIST
=
ARGS
.
platform
# for platform in PLATFORM_LIST:
# for platform in PLATFORM_LIST:
# if platform not in legal_platform_name:
# if platform not in legal_platform_name:
# print("%s is not a legal platform name, "
# print("%s is not a legal platform name, "
...
@@ -42,7 +42,8 @@ if ARGS.platform != []:
...
@@ -42,7 +42,8 @@ if ARGS.platform != []:
OUTPUT_TO_ES_RAW
=
ARGS
.
output_to_es_raw
OUTPUT_TO_ES_RAW
=
ARGS
.
output_to_es_raw
OUTPUT_TO_ES_REGISTER
=
ARGS
.
output_to_es_register
OUTPUT_TO_ES_REGISTER
=
ARGS
.
output_to_es_register
PLATFORM_LIST
=
ARGS
.
platform
proxies_num
=
ARGS
.
proxies_num
#
#
# def func_search_keywordlist(platform):
# def func_search_keywordlist(platform):
# search_body = {"query": {"bool": {"filter": []}}}
# search_body = {"query": {"bool": {"filter": []}}}
...
@@ -141,7 +142,7 @@ for platform in PLATFORM_LIST:
...
@@ -141,7 +142,7 @@ for platform in PLATFORM_LIST:
search_pages_max
=
search_pages
,
search_pages_max
=
search_pages
,
output_to_es_raw
=
OUTPUT_TO_ES_RAW
,
output_to_es_raw
=
OUTPUT_TO_ES_RAW
,
output_to_es_register
=
OUTPUT_TO_ES_REGISTER
,
output_to_es_register
=
OUTPUT_TO_ES_REGISTER
,
es_index
=
ES_INDEX
,)
es_index
=
ES_INDEX
,
proxies_num
=
proxies_num
)
except
Exception
as
e
:
except
Exception
as
e
:
print
(
e
)
print
(
e
)
...
...
crawler_sys/site_crawler/zhihu.js
0 → 100644
View file @
071ea91d
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment