Closed wRAR closed 1 year ago
The issues are different though: the zyte-common-items code looks for HasMetadata
and doesn't find it while the web-poet code looks just for some GenericAlias
and in this testcase finds the wrong one.
Not sure what is the correct implementation here as the current code handles all kinds of generic base classes, including ItemPage
, WebPage
, Returns
, Extractor
etc. All of them descend from Returns
though, so maybe we should check the class with isinstance, not for equality.
Similar to https://github.com/zytedata/zyte-common-items/issues/49, even though the code is different, it's also not recursive and fails on e.g. this: