We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8893af2 commit 8d3502bCopy full SHA for 8d3502b
src/extractors/custom/www.fortinet.com/index.js
@@ -1,3 +1,5 @@
1
+import cheerio from 'cheerio';
2
+
3
export const WwwFortinetComExtractor = {
4
domain: 'www.fortinet.com',
5
@@ -26,16 +28,15 @@ export const WwwFortinetComExtractor = {
26
28
},
27
29
30
content: {
- defaultCleaner: false,
-
31
selectors: [
32
'div.responsivegrid.aem-GridColumn.aem-GridColumn--default--12',
33
],
34
35
transforms: {
36
noscript: ($node) => {
37
- const $children = $node.children();
38
- if ($children.length === 1 && $children.get(0).tagName === 'img') {
+ const $ = cheerio.load(`<div>${$node.html()}</div>`);
+ const $children = $('div').children();
39
+ if ($children.length === 1 && $children.get(0).tagName === 'IMG') {
40
return 'figure';
41
}
42
0 commit comments