mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-06-22 05:44:16 -04:00
handle "undefined" in list of frames when extracting outlinks (fixes ARI-4988)
This commit is contained in:
parent
0bd687abde
commit
772bcf0df6
2 changed files with 4 additions and 2 deletions
|
@ -290,8 +290,10 @@ var compileOutlinks = function(frame) {
|
||||||
var outlinks = Array.prototype.slice.call(
|
var outlinks = Array.prototype.slice.call(
|
||||||
frame.document.querySelectorAll('a[href]'));
|
frame.document.querySelectorAll('a[href]'));
|
||||||
for (var i = 0; i < frame.frames.length; i++) {
|
for (var i = 0; i < frame.frames.length; i++) {
|
||||||
|
if (frame.frames[i]) { // sometimes undefined (why?)
|
||||||
outlinks = outlinks.concat(compileOutlinks(frame.frames[i]));
|
outlinks = outlinks.concat(compileOutlinks(frame.frames[i]));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return outlinks;
|
return outlinks;
|
||||||
}
|
}
|
||||||
compileOutlinks(window).join(' ');
|
compileOutlinks(window).join(' ');
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -21,7 +21,7 @@ import setuptools
|
||||||
|
|
||||||
setuptools.setup(
|
setuptools.setup(
|
||||||
name='brozzler',
|
name='brozzler',
|
||||||
version='1.1.dev25',
|
version='1.1.dev26',
|
||||||
description='Distributed web crawling with browsers',
|
description='Distributed web crawling with browsers',
|
||||||
url='https://github.com/internetarchive/brozzler',
|
url='https://github.com/internetarchive/brozzler',
|
||||||
author='Noah Levitt',
|
author='Noah Levitt',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue