I am trying to crawl different websites (e-commerce websites) and extract specific information from the pages of each website (i.e. product price, quantity, date of publication, etc.). My question is: how to configure the parsing since each website has a different HTML layout which means I need different Xpaths for the same item depending on the website? Can we add multiple parser bolts in the topology for each website? If yes, how can we assign different parsefilters.json files to each parser bolt?
Applying different parsefilters to each domain in the same topology
47 Views Asked by Mohamed ET At
1
There are 1 best solutions below
Related Questions in APACHE-STORM
- Reading from a word document using java
- Reading docx files, recognizing and storing italicized text
- How to create a "VALID DOCX" using Coldfusion?
- Mathematics not working when converting from LaTeX to docx (through markdown) using pandoc
- Illegal exception zip file is closed in apache poi for docx file creating after build as jar
- How to identify if a paragraph lands on a page break in Apache POI
- batch file for runing a java command
- Remove cells from word table with Novacode DocX
- How can i delete a bookmark using docx4j?
- Loading text from .docx to MySQL using Python-docx
Related Questions in STORMCRAWLER
- Reading from a word document using java
- Reading docx files, recognizing and storing italicized text
- How to create a "VALID DOCX" using Coldfusion?
- Mathematics not working when converting from LaTeX to docx (through markdown) using pandoc
- Illegal exception zip file is closed in apache poi for docx file creating after build as jar
- How to identify if a paragraph lands on a page break in Apache POI
- batch file for runing a java command
- Remove cells from word table with Novacode DocX
- How can i delete a bookmark using docx4j?
- Loading text from .docx to MySQL using Python-docx
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
You need #586. At the moment there is no way to do it but to put all your XPATH expressions regardless of the site you want to use them on in the parsefilters.json.
You can't assign different parsefilters.json to the various instances of a bolt.
UPDATE however you could have multiple XpathFilters sections within the parseFilters.json. Each could cover a specific source, however, there is currently no way of constraining which source a parse filter gets applied to. You could extend XPathFilter so that it takes some extra config e.g. regular expression a URL must match in order to be applied. That would work quite nicely I think.
I've recently added JsoupFilters which will be in the next release. These should be useful for your use case but that still doesn't solve the issue that you need an implementation of the filter that organizes the resources per host. It shouldn't be too hard to implement taking the URL filter one as a example and would also make a very nice contribution to the project.