所以我使用exiftool -all=命令行工具从图像中删除元数据。但是,当我打印结果图像的元数据时,我得到了这个:
$ exiftool myimage.jpg
ExifTool Version Number : 11.30
File Name : myimage.jpg
Directory : out
File Size : 2.8 MB
File Modification Date/Time : 2019:05:16 03:34:02-07:00
File Access Date/Time : 2019:05:16 03:34:02-07:00
File Inode Change Date/Time : 2019:05:16 03:34:02-07:00
File Permissions : rw-r--r--
File Type : JPEG
File Type Extension : jpg
MIME Type : image/jpeg
DCT Encode Version : 100
APP14 Flags 0 : [14]
APP14 Flags 1 : (none)
Color Transform : YCbCr
Image …Run Code Online (Sandbox Code Playgroud) 我有以下有效的 SVG:
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 500 500">
<defs>
<symbol id="triangle" class="triangle" viewBox="0 0 100 100" preserveAspectRatio="none">
<polygon points="0,100 50,0 100,100" stroke="none" />
</symbol>
<symbol id="rect" viewBox="0 0 100 100" preserveAspectRatio="none">
<rect width='100' height='100' stroke="none"/>
</symbol>
</defs>
<use xlink:href="#rect" width="300" height="300" x="100" y="100"/>
<use xlink:href="#triangle" width="120" height="150" x="180" y="100" fill="white" transform="rotate(180, 250, 175)"/>
</svg>Run Code Online (Sandbox Code Playgroud)
但当我尝试将其变成一个时,clipPath它却变成空白。想知道如何去clipPath上班。这是我尝试过的。
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 500 500">
<defs>
<symbol id="triangle" class="triangle" viewBox="0 0 100 100" preserveAspectRatio="none">
<polygon points="0,100 50,0 100,100" stroke="none" /> …Run Code Online (Sandbox Code Playgroud)我正在使用Puppeteer来抓取网页。我想解析页面中的 URL,等等。我知道我可以将功能移出page.evaluate,但这不是主要问题。问题是如何将任意脚本注入页面,以便您可以在page.evaluate.
就我而言,我使用的是lil-uri。我基本上是这样的:
var puppeteer = require('puppeteer')
var URL = require('lil-uri')
puppeteer.launch().then(browser => {
browser.newPage().then(page => {
page.goto('https://foo.com').catch(onerror).then(() => {
page.evaluate(fetchLinks).catch(onerror)
})
})
// })
})
function onerror(err) {
console.log('ERRR', err)
}
function fetchLinks() {
var linkEls = document.querySelectorAll('a')
var links = []
for (var i = 0, n = linkEls.length; i < n; i++) {
var el = linkEls[i]
// PARSE URL
var url = parseUrl(el.getAttribute('href'))
links.push(url)
}
return links
function …Run Code Online (Sandbox Code Playgroud) clip-path ×1
exiftool ×1
image ×1
javascript ×1
metadata ×1
node.js ×1
puppeteer ×1
security ×1
svg ×1
web-crawler ×1