page.open('http://example.com/?q=houston', function () {

  // Checks for bottom div and scrolls down from time to time
window.setInterval(function() {
// Checks if there is a div with class=".has-more-items"
// (not sure if this is the best way of doing it)
var count = page.content.match(/class=".has-more-items"/g); if(count === null) { // Didn't find
page.evaluate(function() {
// Scrolls to the bottom of page
window.document.body.scrollTop = document.body.scrollHeight;
});
}
else { // Found
// Do what you want
...
phantom.exit();
}
}, 500); // Number of milliseconds to wait between scrolls });

How to scroll down with Phantomjs to load dynamic content的更多相关文章

  1. PHP Startup: Unable to load dynamic library

    昨天帮一朋友配置服务器结果发现apache日志中有PHP Warning: PHP Startup: Unable to load dynamic library 提示了,然后调试数据库连接发现提示C ...

  2. PHP启动:动态库加载失败(PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/php7/lib/php/extensions/no-debug-non-zts-20151012/*.so')

    今天在linux上面智障一般搞了好久,本来想安装个swoole的,然后用  php -m 的命令想看下安装的PHP扩展库,发现有的扩展库有的可以出来,有的加载失败, 加载失败的错误类型: PHP Wa ...

  3. 安装完 swoole 后出现 PHP Warning: PHP Startup: Unable to load dynamic library 'swoole.so'的解决方法

    安装完 swoole 后出现 PHP Warning:  PHP Startup: Unable to load dynamic library 'swoole.so' (tried: /home/s ...

  4. ***XAMPP:报错 Unable to load dynamic library的解决方法

    A PHP Error was encountered Severity: Core Warning Message: PHP Startup: Unable to load dynamic libr ...

  5. Unable to load dynamic library 'zip.so' on Centos 6.8 useing php7.3

    背景: Centos6.8服务器升级php版本,从7.1升级到7.3,常用扩展都安装完成之后,报:Class 'ZipArchive' not found.一看就是zip扩展没有,需要手动安装了. 中 ...

  6. tensorflow2.x 报错 Could not load dynamic library 'cudart64_101.dll'

    当我们使用 tensorflow 最新版本的时候 ,会出现这样的错误 -- ::] Could not load dynamic library 'cudart64_101.dll'; dlerror ...

  7. Python:Ubuntu上出现错误 Could not load dynamic library 'libnvinfer.so.6' / 'libnvinfer_plugin.so.6'

    运行一个py文件,出现如下的错误,原因是没有找到 libnvinfer.so.6 相关库的文件. 1 2021-01-04 18:41:17.324477: W tensorflow/stream_e ...

  8. 【报错记录】Could not load dynamic library 'libnvinfer.so.6'; dlerror: libnvinfer.so.6

    执行import tensorflow的时候有如下报错 (test1) a@10980:~$ python Python 3.6.13 |Anaconda, Inc.| (default, Jun 4 ...

  9. PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/event.so'

    这是因为启动apche 的时候重复加载了php的动态库模块了, 将:/etc/php.d/ 目录下的event.ini中的内容注释掉或者将文件删除即可

随机推荐

  1. 8bit数据 转换为 16bit数据的四种方法

    [转]玩转嵌入式(公众号) 在入门单片机时,想必大家都都会遇到一下这种情况 unsigned char a = 0x12; unsigned char b = 0x34; unsigned int c ...

  2. Best Time to Buy and Sell Stock - LeetCode

    目录 题目链接 注意点 解法 小结 题目链接 Best Time to Buy and Sell Stock - LeetCode 注意点 在卖出之前必须要先购入 解法 解法一:遍历一遍,随时记录当前 ...

  3. 洛谷 P1076 寻宝 解题报告

    P1076 寻宝 题目描述 传说很遥远的藏宝楼顶层藏着诱人的宝藏.小明历尽千辛万苦终于找到传说中的这个藏宝楼,藏宝楼的门口竖着一个木板,上面写有几个大字:寻宝说明书.说明书的内容如下: 藏宝楼共有\( ...

  4. [系统]安装fedora 19

    再也没有什么大道至简了. ==== 步骤如下: 1. 备份. 2. 刻镜像. 选fedora-kde,gnome呵呵. 3. 分区,格式化,安装. 上面3步没什么好说的,按照官网installatio ...

  5. cf1000D Yet Another Problem On a Subsequence (dp)

    设f[i]是以i为开头的好子序列的个数 那么有$f[i]=\sum\limits_{j=i+a[i]+1}^{N+1}{f[j]*C_{j-i-1}^{a[i]}}$(设f[N+1]=1)就是以i为开 ...

  6. nowcoder172A 中位数 (二分答案)

    二分一下答案,假设是x. 我们把大于x的看成1,小于x的看成-1,等于x的看成0 那某个区间的和如果是正的,就说明这个区间中位数大于x:如果是0,就等于x:如果是负的,就小于x: 这样的话,做一个前缀 ...

  7. WebLogic安装及部署

    安装(输入命令打开安装窗口) 打开命令终端,cd 到你wls1036_generic.jar存放的目录下 在终端输入:java -Dspace.detection=false -jar wls1036 ...

  8. javascript面向对象精要第三章对象整理精要

    什么是对象的数据属性?什么是对象的访问器属性?[put]方法是默认创建数据属性的,访 问器属性不包含值而是定义了一个单属性被读取时调用的函数(getter)和当一个属性被写入时 调用的函数(sette ...

  9. Codeforces Round #510 (Div. 2)(C)

    传送门:Problem C https://www.cnblogs.com/violet-acmer/p/9682082.html 题意: 给你n个数,定义有两种操作 ① 1 i j : (i != ...

  10. (next_permutation)Ignatius and the Princess II hdu102

    Ignatius and the Princess II Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K ( ...