GrabzIt 支援將擷取內容匯出到 Amazon S3、Dropbox、FTP 和 WebDav。 首先,取得所需導出方法的憑證並輸入它 into 下面的表格。 然後按 產生 按鈕建立可在 GrabzIt 的 API 中使用的匯出 URL。 但是,在匯出到 DropBox 之前,您需要 授權 GrabzIt 使用您的帳戶。
產生上面的匯出 URL 後,下面將出現我們目前支援的每種程式語言的匯出捕獲的範例。
捕獲是 saved,檔案名稱與捕獲的 id 匹配,檔案副檔名附加到末尾。 例如,如果您建立了 PDF 捕獲並且由 save 方法 是 12345 那麼文件將會匯出為 12345.pdf。 取得檔案名稱的一個更簡單的選擇是指定 回調處理程序 到 save 方法並讀取處理程序程式碼中的檔案名稱。
GrabzItClient grabzIt = new GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret"); ImageOptions options = new ImageOptions(); options.ExportURL = "dropbox://"; grabzIt.URLToImage("http://www.spacex.com", options); grabzIt.Save("http://www.example.com/Home/Handler");
捕獲是 saved,檔案名稱與捕獲的 id 匹配,檔案副檔名附加到末尾。 例如,如果您建立了 PDF 捕獲並且由 save 方法 是 12345 那麼文件將會匯出為 12345.pdf。 取得檔案名稱的一個更簡單的選擇是指定 回調處理程序 到 save 方法並讀取處理程序程式碼中的檔案名稱。
GrabzItClient grabzIt = new GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret"); ImageOptions options = new ImageOptions(); options.setExportURL("dropbox://"); grabzIt.URLToImage("http://www.spacex.com", options); grabzIt.Save("http://www.example.com/handler");
捕獲是 saved,檔案名稱與捕獲的 id 匹配,檔案副檔名附加到末尾。 例如,如果您建立了 PDF 擷取且 ID 為 12345,則該檔案將會匯出為 12345.pdf。 可以使用 onfinish 事件存取該 id,如下所示。
<script src="https://cdn.jsdelivr.net/npm/@grabzit/js@3.5.2/grabzit.min.js"></script> <script> GrabzIt("Sign in to view your Application Key").ConvertURL("http://www.spacex.com", {"onfinish": function (id){ alert(id); }, "export":"dropbox://"}).Create(); </script>
捕獲是 saved,檔案名稱與捕獲的 id 匹配,檔案副檔名附加到末尾。 例如,如果您建立了 PDF 捕獲並且由 save 方法 是 12345 那麼文件將會匯出為 12345.pdf。 取得檔案名稱的一個更簡單的選擇是指定 回調處理程序 到 save 方法並讀取處理程序程式碼中的檔案名稱。
var grabzit = require('grabzit'); var client = new grabzit("Sign in to view your Application Key", "Sign in to view your Application Secret"); var options = {"exportUrl":"dropbox://"}; client.url_to_image("http://www.spacex.com", options); client.save("http://www.example.com/handler", function (error, id){ if (error != null){ throw error; } });
捕獲是 saved,檔案名稱與捕獲的 id 匹配,檔案副檔名附加到末尾。 例如,如果您建立了 PDF 捕獲並且由 save 方法 是 12345 那麼文件將會匯出為 12345.pdf。 取得檔案名稱的一個更簡單的選擇是指定 回調處理程序 到 save 方法並讀取處理程序程式碼中的檔案名稱。
$grabzIt = GrabzItClient->new("Sign in to view your Application Key", "Sign in to view your Application Secret"); $options = GrabzItImageOptions->new(); $options->exportURL("dropbox://"); $grabzIt->URLToImage("http://www.spacex.com", $options); $grabzIt->Save("http://www.example.com/handler.pl");
捕獲是 saved,檔案名稱與捕獲的 id 匹配,檔案副檔名附加到末尾。 例如,如果您建立了 PDF 捕獲並且由 save 方法 是 12345 那麼文件將會匯出為 12345.pdf。 取得檔案名稱的一個更簡單的選擇是指定 回調處理程序 到 save 方法並讀取處理程序程式碼中的檔案名稱。
$grabzIt = new \GrabzIt\GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret"); $options = new \GrabzIt\GrabzItImageOptions(); $options->setExportURL("dropbox://"); $grabzIt->URLToImage("http://www.spacex.com", $options); $grabzIt->Save("http://www.example.com/handler.php");
捕獲是 saved,檔案名稱與捕獲的 id 匹配,檔案副檔名附加到末尾。 例如,如果您建立了 PDF 捕獲並且由 save 方法 是 12345 那麼文件將會匯出為 12345.pdf。 取得檔案名稱的一個更簡單的選擇是指定 回調處理程序 到 save 方法並讀取處理程序程式碼中的檔案名稱。
grabzIt = GrabzItClient.GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret") options = GrabzItImageOptions.GrabzItImageOptions() options.exportURL = "dropbox://" grabzIt.URLToImage("http://www.spacex.com", options) grabzIt.Save("http://www.example.com/handler.py")
所有捕獲都是 saved,檔案名稱與捕獲的 id 匹配,檔案副檔名附加到末尾。 要取得檔案名,您必須指定回調處理程序參數,或許還需要指定自訂標識符,以允許您在處理程序程式碼中執行任何所需的後處理。
https://api.grabz.it/services/convert?key=Sign in to view your Application Key&export=dropbox%3A%2F%2F&customid=123&callback=https%3A%2F%2Fwww.example.com%2Fmy_handler&format=jpg&url=https%3A%2F%2Fspacex.com%2F
捕獲是 saved,檔案名稱與捕獲的 id 匹配,檔案副檔名附加到末尾。 例如,如果您建立了 PDF 捕獲並且由 save 方法 是 12345 那麼文件將會匯出為 12345.pdf。 取得檔案名稱的一個更簡單的選擇是指定 回調處理程序 到 save 方法並讀取處理程序程式碼中的檔案名稱。
grabzIt = GrabzIt::Client.new("Sign in to view your Application Key", "Sign in to view your Application Secret") options = GrabzIt::ImageOptions.new() options.exportURL = "dropbox://" grabzIt.url_to_image("http://www.spacex.com", options) grabzItClient.save("http://www.example.com/handler/index")
有時,您需要使用 JavaScript API 在瀏覽器中使用匯出 URL,在這種情況下,您的儲存解決方案的使用者名稱和密碼將會暴露。 若要解決此問題,您可以改用安全匯出 URL。 這將阻止您的用戶名和密碼被洩露。 如果您想管理您過去建立的安全匯出 URL,您可以在 應用部分 您的帳戶。