ویب پر گرفت اور تبدیل کرنے کے اوزار

ازگر کے ساتھ موبائل ویب سائٹ کا اسکرین شاٹ لیں

ازگر API

The GrabzIt Python Screenshot API provides the ability to take screenshots of mobile versions of websites, however not all websites have special mobile versions and so it may not work in all circumstances. Mobile screenshot can be requested for both image and PDF screenshots as well as when extracting tables.

ایسا کرنے کے ل you آپ کو 1 پاس کو استعمال کرنا ہوگا setRequestAs اختیارات کا وصف جب تخلیق کرتے ہیں تو تصویر, PDF or ٹیبل، جیسا کہ نیچے دکھایا گیا ہے. اس کے بعد یہ ہدف والی ویب سائٹ کے موبائل ورژن کی درخواست کرے گا۔

زیادہ مستند موبائل اسکرین شاٹ حاصل کرنے کے ل a ، معیاری موبائل براؤزر کی چوڑائی کو اس میں منتقل کرنا بھی اچھا خیال ہے browserWidth کی خاصیت GrabzItImageOptions کلاس یا اگر آپ پی ڈی ایف بنا رہے ہیں تو صفحہ کا ایک چھوٹا سائز منتخب کریں۔

from GrabzIt import GrabzItClient
from GrabzIt import GrabzItImageOptions

options = GrabzItImageOptions.GrabzItImageOptions()
options.format = "png"
options.browserWidth = 320
options.width = 256
options.height = 256
options.requestAs = 1

grabzIt = GrabzItClient.GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret")
grabzIt.URLToImage("https://www.tesla.com", options)
grabzIt.Save("http://www.mysite.com/handler.py")