-
Notifications
You must be signed in to change notification settings - Fork 117
Add raw json output to JsonLdExtractor #103
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Open
Granitosaurus
wants to merge
8
commits into
scrapinghub:master
Choose a base branch
from
Granitosaurus:jsonld_as_json
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
1c96c8f
change jsonldextractor to extract raw
efe64cb
fix typo
7fa3a47
rename kwarg as_json to parse_json
2f6fe4f
revert to try/except for loading json with comments
d9564d0
adjust comments
08a43db
add parse_json argument to rdfa extractor; update readme with parse_j…
7f1b66f
fix json-ld raw extraction separating characters unnecessarily
ff22c72
add tests for parse_json=False flag for rdfa and jsonld extractors
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,106 +1,137 @@ | ||
[ | ||
{ | ||
"@type": ["http://xmlns.com/foaf/0.1/Image"], | ||
"@id": "http://nielslubberman.nl/drupal/sites/default/files/styles/smallcrop/public/projects/pictures/pro_poster_jobs.png?itok=QUE2ZKFT&sc=259cbe26e2b9c2489443d05fdcd3f824" | ||
"@id": "http://nielslubberman.nl/drupal/sites/default/files/images/headlines/headline_download.png", | ||
"@type": [ | ||
"http://xmlns.com/foaf/0.1/Image" | ||
] | ||
}, | ||
{ | ||
"@type": ["http://xmlns.com/foaf/0.1/Image"], | ||
"@id": "http://nielslubberman.nl/drupal/sites/default/files/styles/smallcrop/public/projects/pictures/pro_kanaal.jpg?itok=cV8u1cxa&sc=b496d2d94d76a056d4e6efde1cfb2abe" | ||
}, | ||
{ | ||
"@type": ["http://xmlns.com/foaf/0.1/Image"], | ||
"@id": "http://nielslubberman.nl/drupal/sites/default/files/styles/smallcrop/public/projects/pictures/pro_asppolgs_final.png?itok=apZpSYdS&sc=7ade4b4c9baeea7a86bad48589f9649d" | ||
}, | ||
{ | ||
"@type": ["http://xmlns.com/foaf/0.1/Image"], | ||
"@id": "http://nielslubberman.nl/drupal/sites/default/files/styles/smallcrop/public/projects/pictures/pro_poster_tim_berners_lee.png?itok=DghJBlqt&sc=259cbe26e2b9c2489443d05fdcd3f824" | ||
}, | ||
{ | ||
"@type": ["http://xmlns.com/foaf/0.1/Image"], | ||
"@id": "http://nielslubberman.nl/drupal/sites/default/files/styles/smallcrop/public/projects/pictures/pro_poster_roemenie.png?itok=pScuIyeN&sc=363eea0a2ddd62c554241fc1fed1f3bc" | ||
}, | ||
{ | ||
"http://www.w3.org/1999/xhtml/vocab#icon": [ | ||
{ | ||
"@id": "http://nielslubberman.nl/drupal/misc/favicon.ico" | ||
} | ||
], | ||
"@id": "http://nielslubberman.nl/drupal/", | ||
"http://purl.org/rss/1.0/modules/content/encoded": [ | ||
{ | ||
"@value": "<p xml:lang=\"en\" xmlns=\"http://www.w3.org/1999/xhtml\" xmlns:content=\"http://purl.org/rss/1.0/modules/content/\" xmlns:dc=\"http://purl.org/dc/terms/\" xmlns:foaf=\"http://xmlns.com/foaf/0.1/\" xmlns:og=\"http://ogp.me/ns#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\" xmlns:sioc=\"http://rdfs.org/sioc/ns#\" xmlns:sioct=\"http://rdfs.org/sioc/types#\" xmlns:skos=\"http://www.w3.org/2004/02/skos/core#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\">Op deze vernieuwde website kunt u enkele van mijn projecten vinden, tevens kunt u lessen downloaden die ik heb gemaakt.</p>\n\n", | ||
"@type": "http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral" | ||
"@type": "http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral", | ||
"@value": "<p xmlns:content=\"http://purl.org/rss/1.0/modules/content/\" xmlns:dc=\"http://purl.org/dc/terms/\" xmlns:foaf=\"http://xmlns.com/foaf/0.1/\" xmlns:og=\"http://ogp.me/ns#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\" xmlns:sioc=\"http://rdfs.org/sioc/ns#\" xmlns:sioct=\"http://rdfs.org/sioc/types#\" xmlns:skos=\"http://www.w3.org/2004/02/skos/core#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\">Voeg mij nu toe aan uw professionele netwerk op LinkedIn.</p>\n\n" | ||
}, | ||
{ | ||
"@value": "<p xml:lang=\"en\" xmlns=\"http://www.w3.org/1999/xhtml\" xmlns:content=\"http://purl.org/rss/1.0/modules/content/\" xmlns:dc=\"http://purl.org/dc/terms/\" xmlns:foaf=\"http://xmlns.com/foaf/0.1/\" xmlns:og=\"http://ogp.me/ns#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\" xmlns:sioc=\"http://rdfs.org/sioc/ns#\" xmlns:sioct=\"http://rdfs.org/sioc/types#\" xmlns:skos=\"http://www.w3.org/2004/02/skos/core#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\">Voeg mij nu toe aan uw professionele netwerk op LinkedIn.</p>\n\n", | ||
"@type": "http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral" | ||
"@type": "http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral", | ||
"@value": "<p xmlns:content=\"http://purl.org/rss/1.0/modules/content/\" xmlns:dc=\"http://purl.org/dc/terms/\" xmlns:foaf=\"http://xmlns.com/foaf/0.1/\" xmlns:og=\"http://ogp.me/ns#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\" xmlns:sioc=\"http://rdfs.org/sioc/ns#\" xmlns:sioct=\"http://rdfs.org/sioc/types#\" xmlns:skos=\"http://www.w3.org/2004/02/skos/core#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\">Op deze vernieuwde website kunt u enkele van mijn projecten vinden, tevens kunt u lessen downloaden die ik heb gemaakt.</p>\n\n" | ||
}, | ||
{ | ||
"@value": "<p xml:lang=\"en\" xmlns=\"http://www.w3.org/1999/xhtml\" xmlns:content=\"http://purl.org/rss/1.0/modules/content/\" xmlns:dc=\"http://purl.org/dc/terms/\" xmlns:foaf=\"http://xmlns.com/foaf/0.1/\" xmlns:og=\"http://ogp.me/ns#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\" xmlns:sioc=\"http://rdfs.org/sioc/ns#\" xmlns:sioct=\"http://rdfs.org/sioc/types#\" xmlns:skos=\"http://www.w3.org/2004/02/skos/core#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\">Met behulp van de pijl hieronder kunt u mijn CV downloaden.</p>\n\n", | ||
"@type": "http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral" | ||
"@type": "http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral", | ||
"@value": "<p xmlns:content=\"http://purl.org/rss/1.0/modules/content/\" xmlns:dc=\"http://purl.org/dc/terms/\" xmlns:foaf=\"http://xmlns.com/foaf/0.1/\" xmlns:og=\"http://ogp.me/ns#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\" xmlns:sioc=\"http://rdfs.org/sioc/ns#\" xmlns:sioct=\"http://rdfs.org/sioc/types#\" xmlns:skos=\"http://www.w3.org/2004/02/skos/core#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\">Met behulp van de pijl hieronder kunt u mijn CV downloaden.</p>\n\n" | ||
} | ||
], | ||
"http://www.w3.org/1999/xhtml/vocab#alternate": [ | ||
{ | ||
"@id": "http://nielslubberman.nl/drupal/?q=rss.xml" | ||
} | ||
], | ||
"@id": "http://nielslubberman.nl/drupal/" | ||
"http://www.w3.org/1999/xhtml/vocab#icon": [ | ||
{ | ||
"@id": "http://nielslubberman.nl/drupal/misc/favicon.ico" | ||
} | ||
] | ||
}, | ||
{ | ||
"@type": ["http://xmlns.com/foaf/0.1/Image"], | ||
"@id": "http://nielslubberman.nl/drupal/sites/default/files/images/headlines/headline_linkedin.png" | ||
"@id": "http://nielslubberman.nl/drupal/sites/default/files/styles/smallcrop/public/projects/pictures/pro_poster_turing.png?itok=anlTc5N6&sc=259cbe26e2b9c2489443d05fdcd3f824", | ||
"@type": [ | ||
"http://xmlns.com/foaf/0.1/Image" | ||
] | ||
}, | ||
{ | ||
"@type": ["http://xmlns.com/foaf/0.1/Image"], | ||
"@id": "http://nielslubberman.nl/drupal/sites/default/files/images/headlines/headline_download.png" | ||
"@id": "http://nielslubberman.nl/drupal/sites/default/files/styles/smallcrop/public/projects/pictures/pro_poster_jobs.png?itok=QUE2ZKFT&sc=259cbe26e2b9c2489443d05fdcd3f824", | ||
"@type": [ | ||
"http://xmlns.com/foaf/0.1/Image" | ||
] | ||
}, | ||
{ | ||
"@type": ["http://xmlns.com/foaf/0.1/Image"], | ||
"@id": "http://nielslubberman.nl/drupal/sites/default/files/styles/smallcrop/public/projects/pictures/pro_poster_turing.png?itok=anlTc5N6&sc=259cbe26e2b9c2489443d05fdcd3f824" | ||
"@id": "http://nielslubberman.nl/drupal/sites/default/files/images/projects/grey_img_2.png", | ||
"@type": [ | ||
"http://xmlns.com/foaf/0.1/Image" | ||
] | ||
}, | ||
{ | ||
"@type": ["http://xmlns.com/foaf/0.1/Image"], | ||
"@id": "http://nielslubberman.nl/drupal/sites/default/files/styles/smallcrop/public/projects/pictures/pro_ru_secure.png?itok=2-xDWirb&sc=67c0f518676aaf034a9215a0ec7e9e1e" | ||
"@id": "http://nielslubberman.nl/drupal/sites/default/files/styles/smallcrop/public/projects/pictures/pro_poster_roemenie.png?itok=pScuIyeN&sc=363eea0a2ddd62c554241fc1fed1f3bc", | ||
"@type": [ | ||
"http://xmlns.com/foaf/0.1/Image" | ||
] | ||
}, | ||
{ | ||
"@type": ["http://xmlns.com/foaf/0.1/Image"], | ||
"@id": "http://nielslubberman.nl/drupal/sites/default/files/styles/smallcrop/public/projects/pictures/1979%20Nicolae%20si%20Nicu%20Ceausescu%20la%20Canal.JPG?itok=CYcBbx1w&sc=3e5afd5e3e8746f6db8fb6f52a325372" | ||
"@id": "http://nielslubberman.nl/drupal/sites/default/files/styles/smallcrop/public/projects/pictures/pro_kanaal.jpg?itok=cV8u1cxa&sc=b496d2d94d76a056d4e6efde1cfb2abe", | ||
"@type": [ | ||
"http://xmlns.com/foaf/0.1/Image" | ||
] | ||
}, | ||
{ | ||
"@type": ["http://xmlns.com/foaf/0.1/Image"], | ||
"@id": "http://nielslubberman.nl/drupal/sites/default/files/images/projects/grey_img_1.png" | ||
"@id": "http://nielslubberman.nl/drupal/sites/default/files/styles/smallcrop/public/projects/pictures/pro_poster_gates.png?itok=sIwGJEG3&sc=259cbe26e2b9c2489443d05fdcd3f824", | ||
"@type": [ | ||
"http://xmlns.com/foaf/0.1/Image" | ||
] | ||
}, | ||
{ | ||
"@type": ["http://xmlns.com/foaf/0.1/Image"], | ||
"@id": "http://nielslubberman.nl/drupal/sites/default/files/styles/smallcrop/public/projects/pictures/pro_poster_gates.png?itok=sIwGJEG3&sc=259cbe26e2b9c2489443d05fdcd3f824" | ||
"@id": "http://nielslubberman.nl/drupal/sites/default/files/styles/smallcrop/public/projects/pictures/1979%20Nicolae%20si%20Nicu%20Ceausescu%20la%20Canal.JPG?itok=CYcBbx1w&sc=3e5afd5e3e8746f6db8fb6f52a325372", | ||
"@type": [ | ||
"http://xmlns.com/foaf/0.1/Image" | ||
] | ||
}, | ||
{ | ||
"@type": ["http://xmlns.com/foaf/0.1/Image"], | ||
"@id": "http://nielslubberman.nl/drupal/sites/default/files/images/projects/grey_img_3.png" | ||
"@id": "http://nielslubberman.nl/drupal/sites/default/files/styles/smallcrop/public/projects/pictures/pro_poster_tim_berners_lee.png?itok=DghJBlqt&sc=259cbe26e2b9c2489443d05fdcd3f824", | ||
"@type": [ | ||
"http://xmlns.com/foaf/0.1/Image" | ||
] | ||
}, | ||
{ | ||
"@type": ["http://xmlns.com/foaf/0.1/Image"], | ||
"@id": "http://nielslubberman.nl/drupal/sites/default/files/images/projects/grey_img_2.png" | ||
"@id": "http://nielslubberman.nl/drupal/sites/default/files/images/headlines/headline_linkedin.png", | ||
"@type": [ | ||
"http://xmlns.com/foaf/0.1/Image" | ||
] | ||
}, | ||
{ | ||
"http://www.w3.org/2004/02/skos/core#prefLabel": [ | ||
"@id": "http://nielslubberman.nl/drupal/sites/default/files/images/projects/grey_img_1.png", | ||
"@type": [ | ||
"http://xmlns.com/foaf/0.1/Image" | ||
] | ||
}, | ||
{ | ||
"@id": "http://nielslubberman.nl/drupal/sites/default/files/images/projects/grey_img_4.png", | ||
"@type": [ | ||
"http://xmlns.com/foaf/0.1/Image" | ||
] | ||
}, | ||
{ | ||
"@id": "http://nielslubberman.nl/drupal/sites/default/files/images/projects/grey_img_3.png", | ||
"@type": [ | ||
"http://xmlns.com/foaf/0.1/Image" | ||
] | ||
}, | ||
{ | ||
"@id": "http://nielslubberman.nl/drupal/sites/default/files/styles/smallcrop/public/projects/pictures/pro_ru_secure.png?itok=2-xDWirb&sc=67c0f518676aaf034a9215a0ec7e9e1e", | ||
"@type": [ | ||
"http://xmlns.com/foaf/0.1/Image" | ||
] | ||
}, | ||
{ | ||
"@id": "http://nielslubberman.nl/drupal/sites/default/files/styles/smallcrop/public/projects/pictures/pro_asppolgs_final.png?itok=apZpSYdS&sc=7ade4b4c9baeea7a86bad48589f9649d", | ||
"@type": [ | ||
"http://xmlns.com/foaf/0.1/Image" | ||
] | ||
}, | ||
{ | ||
"@id": "http://nielslubberman.nl/drupal/?q=taxonomy/term/1", | ||
"@type": [ | ||
"http://www.w3.org/2004/02/skos/core#Concept" | ||
], | ||
"http://www.w3.org/2000/01/rdf-schema#label": [ | ||
{ | ||
"@language": "en", | ||
"@value": "Geschiedenis" | ||
} | ||
], | ||
"http://www.w3.org/2000/01/rdf-schema#label": [ | ||
"http://www.w3.org/2004/02/skos/core#prefLabel": [ | ||
{ | ||
"@language": "en", | ||
"@value": "Geschiedenis" | ||
} | ||
], | ||
"@type": ["http://www.w3.org/2004/02/skos/core#Concept"], | ||
"@id": "http://nielslubberman.nl/drupal/?q=taxonomy/term/1" | ||
}, | ||
{ | ||
"@type": ["http://xmlns.com/foaf/0.1/Image"], | ||
"@id": "http://nielslubberman.nl/drupal/sites/default/files/images/projects/grey_img_4.png" | ||
] | ||
} | ||
] | ||
|
1 change: 1 addition & 0 deletions
1
...es/songkick/Elysian Fields Brooklyn Tickets, The Owl Music Parlor, 31 Oct 2015.raw.jsonld
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"@context":"http://schema.org","@type":"MusicEvent","name":"Elysian Fields","url":"http://www.songkick.com/concerts/25248299-elysian-fields-at-owl-music-parlor?utm_medium=organic\u0026utm_source=microformat","location":{"@type":"Place","address":{"@type":"PostalAddress","addressLocality":"Brooklyn","addressCountry":"US","addressRegion":"NY","streetAddress":"497 Rogers Ave","postalCode":"11225"},"name":"The Owl Music Parlor","sameAs":"http://www.theowl.nyc","geo":{"@type":"GeoCoordinates","latitude":40.660109,"longitude":-73.953193}},"startDate":"2015-10-31T19:30:00-0400","performer":[{"@type":"MusicGroup","name":"Elysian Fields","sameAs":"http://www.songkick.com/artists/236156-elysian-fields?utm_medium=organic\u0026utm_source=microformat"}]}] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.