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
backend
crawler
Commits
2a0c4808
Commit
2a0c4808
authored
Jan 07, 2021
by
litaolemo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
4986ac0b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
rpc_data_to_answer.py
crawler_sys/utils/rpc_data_to_answer.py
+6
-5
No files found.
crawler_sys/utils/rpc_data_to_answer.py
View file @
2a0c4808
...
...
@@ -8,8 +8,9 @@ import requests
import
typing
import
asyncio
from
gm_client.rpc
import
create_default_invoker
from
gm_client.rpc.internal.context
import
ClientContext
# from gm_client.rpc import create_default_invoker
# from gm_client.rpc.internal.context import ClientContext
from
helios.rpc
import
create_default_invoker
"""
https://www.yuque.com/docs/share/f4abe44b-6593-46b4-b280-5c87e4db2c85?#
...
...
@@ -44,13 +45,13 @@ def post_data(data_dict:typing.Dict,rpc_type:str) -> typing.Dict:
if
key
not
in
data_type_dict
[
rpc_type
]:
data_dict
.
pop
(
key
)
print
(
data_dict
)
invoker
=
create_default_invoker
(
debug
=
True
)
.
with_config
(
dump_curl
=
True
)
invoker
=
create_default_invoker
()
res
=
invoker
[
rpc_type
](
**
data_dict
)
.
unwrap
()
res
=
invoker
[
rpc_type
](
**
data_dict
)
# print(res.)
print
(
res
)
# print(res
)
print
(
res
.
unwrap
()
)
return
res
...
...
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