Web Yakalama ve Dönüştürme Araçları
Grabz's Çevrimiçi Topluluğu

Wix'te Grabzit

Web sayfalarını veya HTML'yi nasıl yakalayacağınız veya dönüştüreceğinizle ilgili sorular sorun into Resimler, CSV, PDF veya DOCX belgeleri ve ayrıca videoların nasıl dönüştürüleceği intAPI'mızı kullanan animasyonlu GIF'ler.

I have the following code in the onReady function within wix, but it does not appear to be generating a pdf.  

 

    var client = new grabzit("my key", "my secret");
    istemcisi.url_to_pdf("https://www.myfittcoach.com/results");
    istemcisi.save_to("documents/result.pdf", function (error, id){
    if (error !== null){
        throw error;
    }
    });

Asked by Ethan Hull on the 4th of August 2020

First check the documents folder you are saving to exists and that the script has permission to create and write files there.

I don't have any experience with Wix but here is a few ideas after some Google searches.

The nodejs methods you are using is server side only. However the onready method appears to be used both in the browser and server so you will need to detect when it is being run in the server and call the code then: https://support.wix.com/en/article/corvid-about-the-page-rendering-process

Finally if none of that works check your error logs: https://support.wix.com/en/article/corvid-viewing-live-site-events

GrabzIt Desteği tarafından 4 Ağustos 2020'de yanıtlandı

Cevabın için teşekkürler.

Here is what I want to have happen:

Convert the web page into a pdf that downloads as soon as the page loads. 

 

Currently the code is inside the onready funciton within Wix, but it gives an error code of "there was an error in your script" and cannot find module 'crypto'  

I have this at the top of the page before the onready function

import grabzit from 'grabzit';

 

Teşekkürler,
Ethan

 

Answered by Ethan Hull on the 4th of August 2020

I am not sure why they have decided to disable the inbuilt Crypto module but it is quite essential. You could try using the JavaScript API'sı instead. This will do it all in the browser and can save the results directly to a S3 bucket etc, if this helps.

GrabzIt Desteği tarafından 4 Ağustos 2020'de yanıtlandı

A better solution now would probably be to call GrabzIt's REST API kullanma wix-fetch.

GrabzIt Desteği tarafından 17 Mart 2021'de yanıtlandı