phantomjs

Does Facebook know I'm scraping it with PhantomJS and can it change its website to counter me?

為{幸葍}努か 提交于 2020-01-11 12:58:26
问题 So, maybe I'm being paranoid. I'm scraping my Facebook timeline for a hobby project using PhantomJS. Basically, I wrote a program that finds all of my ads by querying the page for the text Sponsored with XPATH inside of phantom's page.evaluate block. The text was being displayed as innerHTML of html a elements. Things were working great for a few days and it was finding tons of ads. Then it stopped returning any results. When I logged into Facebook manually to inspect the elements again, I

Nightmare JS not working

时间秒杀一切 提交于 2020-01-11 09:03:52
问题 I know the title of the question looks very vague! But that's there's to it. I installed nodejs on my production server, which had phantomjs working properly, then I installed nightmare via npm install nightmare , I can see it in node_modules, I tried the example listed by the developers on github: var Nightmare = require('nightmare'); var nightmare = Nightmare({ show: true }) nightmare .goto('http://yahoo.com') .type('input[title="Search"]', 'github nightmare') .click('#uh-search-button')

Clear localstorage with Casperjs

。_饼干妹妹 提交于 2020-01-11 06:49:07
问题 I'm using casperjs to do some testings of a backbonejs application using localstorage. My problem is that I can not clear the localstorage when testing with casperjs. I have been trying to use localStorage.clear(); at the beginning of my casper file but nothing is cleared. 回答1: I found workaround for this problem by deleting file *.localstorage in one of the following directories: Windows c:\Users\YOUR_USER\AppData\Local\Ofi Labs\PhantomJS\ Mac OS X: /Users/YOUR_USER/Library/Application

Phantomjs connection to Facebook fails SSL handshake [duplicate]

折月煮酒 提交于 2020-01-11 06:06:10
问题 This question already has answers here : PhantomJS failing to open HTTPS site (12 answers) Closed 4 years ago . I am trying to build a web scraper for Facebook using phantomjs. The connection fails due to SSL handshake failure. I get the same result for twitter, but google works fine. Does anyone know a solution for this? I am running phantomjs version 1.9.7. I have posted my code and my error output below. var system = require('system'); var page = require('webpage').create(); page.open(

Phantomjs connection to Facebook fails SSL handshake [duplicate]

人走茶凉 提交于 2020-01-11 06:05:19
问题 This question already has answers here : PhantomJS failing to open HTTPS site (12 answers) Closed 4 years ago . I am trying to build a web scraper for Facebook using phantomjs. The connection fails due to SSL handshake failure. I get the same result for twitter, but google works fine. Does anyone know a solution for this? I am running phantomjs version 1.9.7. I have posted my code and my error output below. var system = require('system'); var page = require('webpage').create(); page.open(

Phantomjs connection to Facebook fails SSL handshake [duplicate]

[亡魂溺海] 提交于 2020-01-11 06:04:29
问题 This question already has answers here : PhantomJS failing to open HTTPS site (12 answers) Closed 4 years ago . I am trying to build a web scraper for Facebook using phantomjs. The connection fails due to SSL handshake failure. I get the same result for twitter, but google works fine. Does anyone know a solution for this? I am running phantomjs version 1.9.7. I have posted my code and my error output below. var system = require('system'); var page = require('webpage').create(); page.open(

Unit Testing/mocking Window properties in Angular2 (TypeScript)

两盒软妹~` 提交于 2020-01-10 22:05:29
问题 I'm building some unit tests for a service in Angular2. Within my Service I have the following code: var hash: string; hash = this.window.location.hash; However when I run a test which contains this code, it will fail. It'd be great to utilise all the features of Window, but as I'm using PhantomJs, I don't think this is possible (I have also tried Chrome which yields the same results). In AngularJs, I would have resorted to mocking $Window (or at least the properties in question), but as

Execute a script in phantomjs interactive (REPL) mode [duplicate]

馋奶兔 提交于 2020-01-10 04:23:04
问题 This question already has an answer here : PhantomJS: page.open() does not respond when running in REPL (1 answer) Closed 3 years ago . I have a file that runs and prints output to the screen when I run it in phantomjs non-interactive mode $ phantomjs file.js <stuff printed to screen> In phantonjs interactive (REPL) mode is there a way to run a js file, something like run('file.js') . I want to open up phantomjs as a pipe and send it multiple files to execute before closing the pipe to save

ELK日志服务系统的安装部署

别说谁变了你拦得住时间么 提交于 2020-01-10 03:43:34
分别下载以下包及下载路径 elasticsearch下载网址: https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.5.1-linux-x86_64.tar.gz logstash下载网址: https://artifacts.elastic.co/downloads/logstash/logstash-7.5.1.tar.gz filebeat下载网址: https://artifacts.elastic.co/downloads/kibana/kibana-7.5.1-linux-x86_64.tar.gz Kibana下载网址: https://artifacts.elastic.co/downloads/kibana/kibana-7.5.1-linux-x86_64.tar.gz node的下载网址: https://nodejs.org/dist/v10.15.3/node-v10.15.3-linux-x64.tar.gz phantomjs下载网址: https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-linux-x86_64.tar.bz2 elasticsearch

Selenium/PhantomJS raises error

你。 提交于 2020-01-09 19:30:45
问题 I'm trying to run PhantomJS driver in Python but I'm getting error. I've read that I should pass the whole path as an argument but it didn't help. Here is the code: from selenium import webdriver # driver = webdriver.Chrome('D:\Python_projects\chromedriver_win32/chromedriver.exe') # this works driver = webdriver.PhantomJS(executable_path='D:\Python\phantomjs-2.0.0-windows\bin\phantomjs.exe') ERROR: Traceback (most recent call last): File "path to script", line 8, in <module> driver =