वेब पेजों या HTML को कैप्चर करने या परिवर्तित करने के तरीके पर प्रश्न पूछें into चित्र, CSV, PDF या DOCX दस्तावेज़ और साथ ही वीडियो कैसे परिवर्तित करें intओ एनिमेटेड GIF हमारे एपीआई का उपयोग कर रहा है।
नमस्ते,
I'm a paying customer trying to get a screen shot of a <div> element containing a tweet embed overlayed with a watermark। समस्या यह है कि मुझे केवल एक स्क्रीनशॉट मिलता है watermark. Here is my code... what am I doing wrong?
#tweet {
स्थिति: रिश्तेदार;
z-सूचकांक: 1 !महत्वपूर्ण;
चौड़ाई: 500px; महत्वपूर्ण;
मार्जिन-लेफ्ट: -8px;
मार्जिन-टॉप: -10px;
}
.watermark {
स्थिति: निरपेक्ष;
top:60px;
left:100px;
z-सूचकांक: 10 !महत्वपूर्ण;
display: <?php if($_GET['watermark'] == 0){ $watermark = "none"; } elseif($_GET['watermark'] == 1){ $watermark = ""; } echo $watermark; ?>;
}
#tweet iframe {
border: none !important;
box-shadow: none !important;
}
.copywrite p {
स्थिति: निरपेक्ष;
बाएँ:0;
मार्जिन-टॉप: -9px;
font-family: Gotham, "Helvetica Neue", Helvetica, Arial, "sans-serif";
font-size: 12px;
color:#a2a6a8;
}
<title>Tweet Screen Shot Feeder</title>
<script src="https://cdn.jsdelivr.net/npm/@grabzit/js@3.4.7/grabzit.min.js"></script>
<div class="tweet-wrapper" id="content">
<div id="tweet" tweetID="<?php echo $_GET["tweetid"];?>"></div>
<!-- <div id="tweet" tweetID="1223594060818059264"></div> -->
<img src="images/watermark.png" class="watermark"/>
<div class="copywrite">
<p>Tweet screen shot by <strong>https://sane.social</strong> © on <?php echo date("M. d, Y") . "<br>";?></p>
<script sync src="https://platform.twitter.com/widgets.js"></script>
window.onload = (function(){
var tweet = document.getElementById("tweet");
var id = tweet.getAttribute("tweetID");
twttr.widgets.createTweet(
id, tweet, {
conversation : 'none', // or all
cards : 'visible', // or visible
theme : 'light' // or dark
})
.then (function (el) {
el.contentDocument.querySelector(".footer").style.display = "none";
});
});
<div id="tweetshot"></div>
GrabzIt("XXXX=").ConvertPage(window.location.href, {"target": "#content", "bheight": -1, "height": -1, "width": -1}).AddTo("tweetshot");
I don't think this is an issue with GrabzIt but with the security of Twitters API. It probably doesn't like being used inside a temporary HTML page. Instead you should change your code to use the URL instead:
.ConvertURL(location.href, {"target": "#content", "bheight": -1, "height": -1, "width": -1}).AddTo("tweetshot");