Comments (6)
@Schwankenson I didn't check the string yet but what might help is restricting the supported dialects by passing a custom syntaxes
argument to extruct.extract
, in case you can afford that. Depending on the data you deal with, you might find that some dialects are very rare but have large processing time, so it can make sense to disable them by default. For example, in one project we only use syntaxes=['microdata', 'opengraph', 'json-ld']
as they cover most kinds of semantic markup and are fast.
from extruct.
@lopuhin Great, thank you! Limiting it to json-ld and microdata shortens time to below one second!
from extruct.
Glad it helped, and thanks for checking 👍
I'd rather keep the issue open to see if we can fix this or update defaults or README
from extruct.
For one html string, I waited 10 hours. Finally found out that the problem is just in 'microformat'. After skipping that format, it takes just 1 second.
from extruct.
For one html string, I waited 10 hours. Finally found out that the problem is just in 'microformat'. After skipping that format, it takes just 1 second.
Super helpful thank you - this was the case for me too.
from extruct.
Related Issues (20)
- rdflib 6.0.0 does not always return bytes, breaking extruct.rdfa.RDFaExtractor HOT 3
- Adding twitter tags HOT 5
- Extruct - 0.13.0 is not compatible with the latest rdflib HOT 5
- Installation error: "rdflib-jsonld setup command: use_2to3 is invalid" HOT 1
- ValueError: Unicode strings with encoding declaration are not supported. Please use bytes input or XML fragments without declaration. HOT 6
- ModuleNotFoundError: No module named 'rdflib_jsonld.serializer HOT 9
- Example from the README does not work any more
- Extruct not matching up with Schema.org structured data testing tool (Incorrect image Urls) HOT 3
- Some websites put meta tags outside the head. HOT 2
- LD+JSON outside HTML element HOT 1
- error extracting json-ld for validated json
- [suggestion] adding type hints? HOT 7
- Should not Depends on python3 (<< 3.7) HOT 6
- lxml.etree.ParserError: Document is empty HOT 5
- " in application/ld+json gives exception
- Consider switching from lxml's clean_html for enhanced security (and possibly performance) HOT 7
- Selectolax benchmarks
- Unable to get meta tag value from inside body
- SyntaxWarning invalid escape sequence '\s'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from extruct.