Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

query 疑似有误 #28

Closed
LuuMing opened this issue Oct 8, 2018 · 1 comment
Closed

query 疑似有误 #28

LuuMing opened this issue Oct 8, 2018 · 1 comment

Comments

@LuuMing
Copy link
Collaborator

LuuMing commented Oct 8, 2018

  1. 在 crawler.py 的 fetch_user_data 函数中
    next_query = query.organ_all_query_with_pager % ( organization, helpers.get_page_cursor(result, "user_repository"))
    疑似应为
    next_query = query.user_all_query_with_pager % ( user, helpers.get_page_cursor(result, 'user_repository'))

  2. 在 helpers.py 的 get_page_cursor 函数中
    if mode == "user_repository": return result["data"]["organization"]["repositories"]["pageInfo"]["endCursor"]
    疑似应为
    return result["data"]["user"]["repositories"]["pageInfo"]["endCursor"]

  3. 此外,当用户 repository 过多时(例如 cloudwu),抓取到的数据呈现
    {'data': {'organization': None}, 'errors': [{'message': "Could not resolve to an Organization with the login of 'cloudwu'.", 'type': 'NOT_FOUND', 'path': ['organization'], 'locations': [{'line': 3, 'column': 3}]}]}
    因此访问 'user' key 会出错。

@bestony
Copy link
Member

bestony commented Oct 8, 2018

正在修复1.2,3的问题我等会看一下。

@bestony bestony closed this as completed in 5ffc846 Oct 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants