phantomjs

CasperJS hangs out when accessing Google Keyword Planner

陌路散爱 提交于 2019-12-13 12:19:35
问题 My goal is to grab keywords from Google Keyword Planner, as the API does not support getting search volume in last 24 months but 12 months only. I use maily SimpleBrowser, so I am new with CasperJS, I googled some scripts, read documentation and then combined following script. I can login to Google, even to Adwords dashboard, but when I try to access KeywordPlanner CasperJS freezes, any idea? JS script /** * Basic vars * @type Module utils|Module utils */ var utils = require('utils'); var

Python Selenium PhantomJS - Extract download link of file that is being downloaded

时间秒杀一切 提交于 2019-12-13 10:23:56
问题 So as the title suggests, I am trying to get the direct link of a downloading file using PhantomJS through selenium in Python 3.7 The site I am working on is emuparadise.me, I am downloading a rom file with a request to this link after adding a cookie to avoid getting "Invalid Referer" error. When the request is made browser.current_url shows about:blank and I know that the file has started downloading by checking network usage for PhantomJS. Having been browsing the internet for over 3 hours

CasperJS: execute evaluate failed while the same code succeed in Chrome console

随声附和 提交于 2019-12-13 07:14:37
问题 The code: var array = casper.evaluate(function () { var nodes = document.querySelectorAll('#J_bought_main > div > div:nth-child(4) > div:nth-child(3) > div > div'); return Array.prototype.map.call(nodes, function extractOrder(x) { var textNode = x.querySelector('table:nth-child(2) > tbody > tr:nth-child(2) > td:nth-child(5) > div > p:nth-child(2)'); var urlNode = x.querySelector('table:nth-child(2) > tbody > tr:nth-child(2) > td:nth-child(6) > div > div:nth-child(2) > div:nth-child(1) > span

Highcharts boundingbox issue with env.js

放肆的年华 提交于 2019-12-13 06:42:54
问题 In the new feature article on Highcharts for the serverside using Export Server and PhantomJS, issues related to bounding box in Env.js (used with Rhino) is mentioned. Could you please post an example where the chart is rendered incorrectly due to the bounding box for SVG issue? Is there any specific pattern in which it could happen? 回答1: Highcharts calculates the bounding boxes of for example labeltext. This is to prevent collision/overlapping of labeltext. You can test the breakdown of this

Failing to open HTTPS pages in PhantomJS using Splinter

别说谁变了你拦得住时间么 提交于 2019-12-13 06:38:08
问题 I'm trying to use PhantomJS to write a scraper but even the example in the documentation of morph.io is not working. I guess the problem is "https", I tested it with http and it is working. Can you please give me a solution? I tested it using firefox and it works. from splinter import Browser with Browser("phantomjs") as browser: # Optional, but make sure large enough that responsive pages don't # hide elements on you... browser.driver.set_window_size(1280, 1024) # Open the page you want...

Why can't Groovy find this program even though it's on my PATH?

谁说胖子不能爱 提交于 2019-12-13 05:42:13
问题 tl;dr: Groovy cannot find a program ( phantomjs , which is on my $PATH ) when I attempt to execute the shell command from a class -- it's otherwise finds it just fine from the Groovy Console or from a Grails CLI script. What gives? We have a Grails script to execute JavaScript unit tests in PhantomJS ("the headless WebKit"). When these tests are executed in a stand-alone script (call it grails test-js ) things work just fine. The relevant line from the Grails/Gant script was: // where

Selenium selectors on SVG TSPAN elements fail with certain versions of PhantomJS

蓝咒 提交于 2019-12-13 05:24:54
问题 I am using Geb and Selenium, and noticed that tests that reference certain SVG elements fail on certain PhantomJS versions. This test running against the Highcharts demo site passes if I'm using PhantomJS 1.9.1, but fails on 1.9.7 - the SVG tspan element is successfully located ( size() > 0 passes) but text() returns empty string. I have been able to isolate that the problem is not Geb specifically - I get the same problem when I interact with the PhantomJSDriver directly. So I don't where to

phantomjs on Mac OS X works from the command line, not via exec()

廉价感情. 提交于 2019-12-13 04:22:41
问题 the following works fine on the command line for user xyz: /opt/local/bin/phantomjs --version 1.9.1 But, in PHP, with the same user (xyz), I get an error code 5 exec('/opt/local/bin/phantomjs --version', $o, $r) echo $r I'm using MAMP, and exec() normally works fine. If anyone knows how to debug this I would e very greatful! 回答1: Thanks to Amal Murali for pointing me in the right direction! This is documented also in exec() command on mac osx returns 5, and can be fixed by unsetting DYLD

Cannot pass CasperJS result back to PHP

我们两清 提交于 2019-12-13 04:20:03
问题 This question was migrated from Software Engineering Stack Exchange because it can be answered on Stack Overflow. Migrated 5 years ago . I am trying to pass CasperJS results to PHP but it's not working (the output is empty). Here is my code: <?php exec("casperjs test.js", $array); print_r($array); ?> The exec works for any other command ("echo hello"), but not casperjs. $array is empty and execution time is instantaneous... The PHP script is of course in the same directory as test.js I'm

PhantomJS AWS Browser Tab Title

ぃ、小莉子 提交于 2019-12-13 04:12:56
问题 I have a problem with my browser tab title. Actually on my website I generate some report using PhantomJS and pull them on a AWS S3 Bucket. I access to them using some link like that : http://192.168.33.120/report/8/1?export=inline The problem is that my Browser tab titles are like : 1 or 1?export=inline, it display the url and not my PDF file name. Is that possible using PhantomJS to set a property like title or other think like that to specify the title that I want to show on browser view ?