apify

How to make the Apify Crawler to scroll full page when web page have infinite scrolling?

a 夏天 提交于 2021-02-19 16:12:03
问题 I'm facing a problem that I unable to get all the product data as the website using a lazy load on product catalog page. meaning it needs to scroll until the whole page loaded. I getting only first-page products data. 回答1: First, you should keep in mind that there are infinite ways that infinite scroll can be implemented. Sometimes you have to click buttons on the way or do any sort of transitions. I will cover only the most simple use-case here which is scrolling down with some interval and

How to make the Apify Crawler to scroll full page when web page have infinite scrolling?

∥☆過路亽.° 提交于 2021-02-19 16:08:45
问题 I'm facing a problem that I unable to get all the product data as the website using a lazy load on product catalog page. meaning it needs to scroll until the whole page loaded. I getting only first-page products data. 回答1: First, you should keep in mind that there are infinite ways that infinite scroll can be implemented. Sometimes you have to click buttons on the way or do any sort of transitions. I will cover only the most simple use-case here which is scrolling down with some interval and

How to make the Apify Crawler to scroll full page when web page have infinite scrolling?

妖精的绣舞 提交于 2021-02-19 16:05:14
问题 I'm facing a problem that I unable to get all the product data as the website using a lazy load on product catalog page. meaning it needs to scroll until the whole page loaded. I getting only first-page products data. 回答1: First, you should keep in mind that there are infinite ways that infinite scroll can be implemented. Sometimes you have to click buttons on the way or do any sort of transitions. I will cover only the most simple use-case here which is scrolling down with some interval and

How to make the Apify Crawler to scroll full page when web page have infinite scrolling?

生来就可爱ヽ(ⅴ<●) 提交于 2021-02-19 16:04:43
问题 I'm facing a problem that I unable to get all the product data as the website using a lazy load on product catalog page. meaning it needs to scroll until the whole page loaded. I getting only first-page products data. 回答1: First, you should keep in mind that there are infinite ways that infinite scroll can be implemented. Sometimes you have to click buttons on the way or do any sort of transitions. I will cover only the most simple use-case here which is scrolling down with some interval and

How do I click a button that has no ID using (Apify's) Puppeteer?

泪湿孤枕 提交于 2021-02-11 12:26:52
问题 I am using Apify's puppeteer to login to this website. I did research similar questions but to no avail. I am having trouble finding the clickable id/element for the main Login button seen on the linked login page. Currently, my code reads like this: const Apify = require('apify'); Apify.main(async () => { const input = await Apify.getValue('INPUT'); const browser = await Apify.launchPuppeteer(); const page = await browser.newPage(); await page.goto('https://www.sunpass.com/vector/account

How do I click a button that has no ID using (Apify's) Puppeteer?

荒凉一梦 提交于 2021-02-11 12:25:45
问题 I am using Apify's puppeteer to login to this website. I did research similar questions but to no avail. I am having trouble finding the clickable id/element for the main Login button seen on the linked login page. Currently, my code reads like this: const Apify = require('apify'); Apify.main(async () => { const input = await Apify.getValue('INPUT'); const browser = await Apify.launchPuppeteer(); const page = await browser.newPage(); await page.goto('https://www.sunpass.com/vector/account

How to use Apify on Google Cloud Functions

心不动则不痛 提交于 2020-01-30 12:27:57
问题 I'm deploying some code using Apify as Google Cloud Functions. When triggered, the Cloud Function terminates silently. What am I doing wrong? I have some working code using Apify 0.15.1. It runs fine locally. Once deployed as a Google Cloud Function, it fails silently without any clear error. The equivalent code using Puppeteer 1.18.1 works fine. I've reproduced the issue using more simple code below. While this example doesn't strictly require Apify, I would like to be able to use the extra

Fundamental questions about injectFile

怎甘沉沦 提交于 2020-01-16 09:07:25
问题 I have some fundamental questions about injectFile: When do you recomment using injectFile(code) instead of page.evaluate(code, ...) to get code into the page to be scraped? What are the differences/advantages/disadvantages in using injectFile(code), for example in performance, anti-scraping-detectability or the like? How should injectFile(code) be implemented, by replacing gotoFunction and implementing page.on('domcontentloaded', ...) event, like I did? Or is there a better way? What is the

How to call Apify Google Search Scrapper Task Using JQuery/Ajax?

[亡魂溺海] 提交于 2019-12-20 05:42:08
问题 I am learning to use apify/google-search-scraper through their API call. The document is given here. I am bit confused with their documentation as I am new. Especially I need the help to configure the call. It $.ajax({ url : '', method : "POST", contentType: "application/json; charset=utf-8", data : { }, success:function(response) { console.log(response.data); } }); url : what should I write here? data : Should I pass parameters here? Thanks in advance. 回答1: You need to use run task API

How to call Apify Google Search Scrapper Task Using JQuery/Ajax?

徘徊边缘 提交于 2019-12-20 05:42:05
问题 I am learning to use apify/google-search-scraper through their API call. The document is given here. I am bit confused with their documentation as I am new. Especially I need the help to configure the call. It $.ajax({ url : '', method : "POST", contentType: "application/json; charset=utf-8", data : { }, success:function(response) { console.log(response.data); } }); url : what should I write here? data : Should I pass parameters here? Thanks in advance. 回答1: You need to use run task API