In my previous post we mimicked the latest Technology of Xerox using Powershell to Extract Text from an Locally saved Image (On your machine). But today we’ll see how to do some web scrapping from Images hosted on websites, using the Image URL.
I was going through MVP, Doug Finke’s GitHub gist and found a function Get-Snoverism and I thought why not use it with my Get-ImageText Function to extract Text from the web hosted Images
HOW TO ACHIEVE IT :
So lets break this into a 3 step process.
- Target a website and Look for Images using the Invoke-WebRequest Cmdlet
This is the Image where this URL leads us –
- Extract the Text from the Image using Get-ImageText Function that I’ve shared with you guys in my previous post, but with some modifications, in order to accept URL as Input instead of a local File.
- Use text you’ve extracted. You can now Translate the Text in desired Language, Print, Email and Save it as a document using Powershell .
HOW TO RUN IT:
I’ve customized my Get-Image Function a bit and fed the Image URL to it instead of path of the locally saved Image. Following is an Animation how to run it.
GET THE SCRIPT :
Click here to go to my GitHub Gist for the complete script.
PLEASE NOTE :
You would need Subscription key for Microsoft optical Recognition API and ClientID and Client_secret for Microsoft Bing Translation API, please follow below links to get an idea how to obtain these keys.