mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-06-21 13:24:20 -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(
|
||||
frame.document.querySelectorAll('a[href]'));
|
||||
for (var i = 0; i < frame.frames.length; i++) {
|
||||
if (frame.frames[i]) { // sometimes undefined (why?)
|
||||
outlinks = outlinks.concat(compileOutlinks(frame.frames[i]));
|
||||
}
|
||||
}
|
||||
return outlinks;
|
||||
}
|
||||
compileOutlinks(window).join(' ');
|
||||
|
|
2
setup.py
2
setup.py
|
@ -21,7 +21,7 @@ import setuptools
|
|||
|
||||
setuptools.setup(
|
||||
name='brozzler',
|
||||
version='1.1.dev25',
|
||||
version='1.1.dev26',
|
||||
description='Distributed web crawling with browsers',
|
||||
url='https://github.com/internetarchive/brozzler',
|
||||
author='Noah Levitt',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue