-
Notifications
You must be signed in to change notification settings - Fork 7
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
add 'notes' to Request #97
base: main
Are you sure you want to change the base?
Conversation
Something like I wonder if, to make it be in line with the rest of the schema, it should be called |
I initially implemented it using a
Updated this in a92ca86.
Not quite sure yet with this one. I think I'm slightly leaning towards it not having to conform with the rest of the schema just to give the idea that values from this field doesn't come from Zyte API Extraction. I was thinking of calling it |
I like the dict type better, I'm not sure if I like the "notes" name but I don't think "*metadata" is better. |
+1 to using dicts. I think it looks more like metadata, not "notes", so +1 to something along these lines. ProbabilityRequest already have metadata attribute though. Having both "meta" and "metadata" sounds weird. For me it feels more natural to put metadata into the existing metadata attribute. But how to do it? I think we can consider extending BaseMetadata to include this dict; it'd be something like |
A proposal to add some way of putting some kind of information to the Request.
One use case is adding some identifiers to a given request. For example, in https://github.com/zytedata/zyte-spider-templates/blob/main/zyte_spider_templates/pages/product_navigation_heuristics.py#L72, a current workaround would be to add some kind of url prefix to
request.name
.It's not pretty but it does the job. However, it'd be hard to properly identify some information here.
It'd be nice if we have some dedicated field to put such arbitrary values. This would be quite useful when developers create page objects with some added notes to the
Request
s.