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
73 Views Asked by Mohamed ET At
1
There are 1 best solutions below
Related Questions in APACHE-STORM
- How can I serialize a numpy array while preserving matrix dimensions?
- Logging from a storm bolt - where is it going?
- Storm Word Count Topology - Concept issue with number of executions
- Supervisor node will not connect to storm cluster
- Storm [ERROR] Async loop died
- How to export data from Cassandra to mongodb?
- Why is my streamparse topology definition complaining about a wrong number of arguments to thrift$mk-topology?
- storm caching in topology level available for all bolts
- java.lang.RuntimeException : no viable alternative at input '<EOF>'
- storm supervisor exits when processing event
- apache storm into node js
- Passing cmd line params to storm subprocesses
- storm-starter with intellij idea,maven project could not find class
- storm + kafka: understanding ack, fail and latency
- storm topology: one to many (random)
Related Questions in STORMCRAWLER
- Is there any limit on redirects in StormCrawler?
- Crawling using Storm Crawler
- Parallel Processing of New Domain/URL inserted in StormCrawler using ElasticSearch
- Debugging Storm Crawler
- How can i debug the the docker container(storm crawler) which is written in java in vs code?
- Is there any systematic way to turn on or turn off some Bolt in StormCrawler?
- About the effect of parallelism in StormCrawler
- How to stop storing special characters in content while indexing
- Using Kafka topic for feeding seeds url to Storm Crawler
- Separation of crawl phase from processing phase in Storm Crawler
- Emit a custom metadata from seed URLs through all child discovered URLs for all depth
- How to store custom metatags in elasticsearch index from a website using stormcrawler
- Unable to install Stormcrawler error with connection refusal port 7071
- Unable to Inject URL seed file in stormcrawler
- Storm Crawler with Java 11
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 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.