Hello Guys,

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.

  1. Target a website and Look for Images using the Invoke-WebRequest Cmdlet1

    This is the Image where this URL leads us –

    4

  2. 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.2
  3. Use text you’ve extracted. You can now Translate the Text in desired Language, PrintEmail and Save it as a document using Powershell .3

 

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.

ezgif.com-video-to-gif (2)

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.

Microsoft OCR API
Microsoft Translator Services

Happy reading!

@SinghPrateik