ontometrics / scraper Goto Github PK
View Code? Open in Web Editor NEWFor scraping content out of pages and/or feeds.
For scraping content out of pages and/or feeds.
I am going through a list of issues right now so I don't have the exact details, consider this a placeholder for now.
Ask me (Garam) when more details are needed, I can provide a failing test.
OOM happened in DefaultFieldExtractor.getFields() method
`java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:3332)
at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:137)
at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:121)
at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:622)
at java.lang.StringBuilder.append(StringBuilder.java:202)
at java.lang.StringBuilder.append(StringBuilder.java:76)
at net.htmlparser.jericho.Renderer$HR_ElementHandler.processBlockContent(Renderer.java:1193)
at net.htmlparser.jericho.Renderer$AbstractBlockElementHandler.process(Renderer.java:1111)
at net.htmlparser.jericho.Renderer$Processor.appendSegmentProcessingChildElements(Renderer.java:852)
at net.htmlparser.jericho.Renderer$Processor.appendTo(Renderer.java:823)
at net.htmlparser.jericho.Renderer.appendTo(Renderer.java:140)
at net.htmlparser.jericho.CharStreamSourceUtil.toString(CharStreamSourceUtil.java:63)
at net.htmlparser.jericho.Renderer.toString(Renderer.java:150)
at com.ontometrics.scraper.extraction.DefaultFieldExtractor.extractFieldsFromUL(DefaultFieldExtractor.java:312)
at com.ontometrics.scraper.extraction.DefaultFieldExtractor.extractFieldsFromULs(DefaultFieldExtractor.java:204)
at com.ontometrics.scraper.extraction.DefaultFieldExtractor.getFields(DefaultFieldExtractor.java:65)`
The page content on which failure happens is referred to in test DefaultFieldExtractorTest.canExtractFieldsWOOutOfMemoryError().
Right now DefaultFieldExtractor will remove all new lines (including <BR>s) from field values (because it uses element.getTextExtractor().toString() such as in getValueFieldText()).
We should be able to replace BRs with semicolons so that we can parse contact fields better, i.e., separated name, job title and address lines.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.