Add raw json output to JsonLdExtractor#103
Add raw json output to JsonLdExtractor#103Granitosaurus wants to merge 8 commits intoscrapinghub:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #103 +/- ##
==========================================
- Coverage 87.3% 86.98% -0.33%
==========================================
Files 11 11
Lines 457 461 +4
Branches 97 98 +1
==========================================
+ Hits 399 401 +2
- Misses 52 53 +1
- Partials 6 7 +1
Continue to review full report at Codecov.
|
lopuhin
left a comment
There was a problem hiding this comment.
Hi @Granitosaurus I think this is a useful feature to have (although #69 still has it's place), left some comments below.
lopuhin
left a comment
There was a problem hiding this comment.
@Granitosaurus thanks 👍 Left a few minor comments. Also would be nice to mention this feature in the README.
…son examples for jsonld and rdfa extractors
|
Also added this feature to RDFA extractor and updated readme with short examples. |
|
This looks mostly ready. What about adding a test covering the usage of |
|
Sorry that it took me so long to attend to this but the tests gave me a bit of an headache :D Should be good to go now! |
|
|
It has been failing master for me too; I actually update the fixtures in this PR to prevent it failing but the test just seems to be flawed in some sense - it keeps either breakin on travis or on my machine locally. 🤷♂️ |
Sometimes jsonld schema is prefered in raw json format rather than python dict - this PR implementes
as_jsonkwarg bool to determine whether to return python dictionary or json string.Some use cases:
My personal use case is to strip away
@keys with object hook: