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

Sample Will disconnect,Unable to continuously get data #427

Closed
xcylyc opened this issue Nov 5, 2018 · 6 comments
Closed

Sample Will disconnect,Unable to continuously get data #427

xcylyc opened this issue Nov 5, 2018 · 6 comments
Assignees
Labels

Comments

@xcylyc
Copy link

xcylyc commented Nov 5, 2018

I did a test today. It can be obtained in a few steps on the browser side, but it is good or bad and not very stable.
My request address (want to get the data for the day)
First time: https://api.crossref.org/works?filter=from-created-date:2018-09-06,until-created-date:2018-09-06&cursor=*
It can be obtained several times later. However, if you check it, you will get an error. The report is that the cursor is wrong.

@xcylyc
Copy link
Author

xcylyc commented Nov 5, 2018

I found a strange phenomenon. If the next cursor is full of spaces, it will report an error.For example,

the correct one: AoJ4hr6i1uUCPwRodHRwOi8vZHguZG9pLm9yZy8xMC4xMTExL2FqZC4xMjkxNw==

Wrong: AoJ33Ii 1uUCPwdodHRwOi8vZHguZG9pLm9yZy8xMC41NDI4L3BjYXIyMDE4MDQxNQ==

As long as there is a space, there is no way to go.

@xcylyc
Copy link
Author

xcylyc commented Nov 5, 2018

Dddress:https://api.crossref.org/works?filter=from-created-date:2018-09-06,until-created-date:2018-09-06&rows=100&cursor=AoJ4spK31uUCPxBodHRwOi8vZHguZG9pLm9yZy8xMC4xMDE2L3MwMTg4LTQ0MDkoMTgpMzAxMzQtNg==

The next cursor you get will not be available.
AoJ33Ii+1uUCPwdodHRwOi8vZHguZG9pLm9yZy8xMC41NDI4L3BjYXIyMDE4MDQxNQ==

@xcylyc
Copy link
Author

xcylyc commented Nov 5, 2018

Error from server at http://mds3:8984/solr/crmds1: Unable to parse 'cursorMark' after totem: value must either be '*' or the 'nextCursorMark' returned by a previous search: AoJ33Ii 1uUCPwdodHRwOi8vZHguZG9pLm9yZy8xMC41NDI4L3BjYXIyMDE4MDQxNQ==

@xcylyc
Copy link
Author

xcylyc commented Nov 5, 2018

Find a way. It turns out that the space or "+" is replaced by "%2B", it seems that it is escaping and not recognized. After reading, you can read the cursor normally.

@xcylyc
Copy link
Author

xcylyc commented Nov 5, 2018

找到办法了。原来吧空格或“+”替换为”%2B“即可,看来是转义了不识别。替换后即可正常读游标

@pdavis8
Copy link
Collaborator

pdavis8 commented Nov 5, 2018

Thanks for the updates on this. Yes the spaces would need to be added into the cursors as the spaces and the + would need encoding in the URL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants