Automated Instructable Views and Favorites Checker

by Pavithra Arunkumar in Circuits > Tools

2397 Views, 56 Favorites, 0 Comments

Automated Instructable Views and Favorites Checker

Main Page.jpg
Main Picture1.jpg
Multiple Address.png
Multiple Results.png

As an Instructables user, Sometime I thought of having a simple automatic tool that can check the views and favorites from my Instrucatbles from Instructables.com site without me actually looking into the application.

Automated Instructable Views and Favorites Checker (thought of naming it as iVFChecker) is developed by using a very basic and easy web browser automation method and HTML.

Web Browser automation has many applications like automatic data entry, reading the content, extracting the data, testing the web page, email checking, sending emails and many more.

For this instructable, I would like to show how to do a basic web page content reading using

1. Internet Browser Automation using Visual basic scripting (Vb Script)

2. HTML for application (HTA)

Basic Internet Browser Automation Using VBScript

Webpage Automation.png

Step 1: Create a Internet Explorer application object

Set IE = CreateObject("InternetExplorer.Application") IE.Visible = 0

Step 2: Navigate to the url using the created object

IE.Navigate 'www.google.com'

Step 3: Wait for the page to load

Do While (IE.Busy Or IE.READYSTATE <> 4)

Loop

Step 4: Read the value from the page using HTML tag name

Set titleName = IE.document.getElementsByClassName("item title-container")

Msgbox titleName(0).innertext

To test the above code, open a note pad and write the below lines and save the note pad as .vbs file and double click the .vbs file

'Copy and paste the below code in note pad and save as .vbs file

Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = 1 'Make IE browser visible IE.Navigate 'https://www.instructables.com/id/Sweet-Coconut- Fried-Pies/' ' Open www.Instructables.com

Do While (IE.Busy Or IE.READYSTATE <> 4) 'Wait until the page loads

Loop

Set titleName = IE.document.getElementsByClassName("item title-container") ' Get the title of the Instructable

Msgbox titleName(0).innertext ' Display the title

Designing a Simple HTML Application (HTA)

HTML Application Screenshot.png
HTML Adding Objects.png
HTML Adding Function1.png

How to create a HTML Application

Open a blank note pad in the system and past the below basic HTML structure and save the file as .hta (ex: DemoHTA.hta)

Step 1: The basic HTML structure (Refer Screenshot 1)

Step 2: Adding objects to the HTA application Add the necessary objects inside the body tag in the HTML (Refer Screenshot 2)

Step 3: Adding the script to the HTA application Add the functions that are required inside the script tag (Refer Screenshot 3)

Automated Instructable Views and Favorites Checker Tool

Application Main Screenshot 1.png
Multiple Address.png
Application Main Talk to me.png
Multiple Results.png

As mentioned earlier, I have used the below steps and developed the 'Automatic Instructables View and Favorite Checker' tool

1. Created a simple HTML Application

2. Added a simple internet automation script to capture the views and favorite count from the browser

3. Display the score in the HTML application

Downloading the application:

Download the attached 'Automatic Instructables View and Favorite Checker.hta' application into the local machine

Using the application:

Prerequisite:

Window operating system, Internet Explorer

1. Right click the file below and save it as a .hta file in desktop and run the application.

2. In the opened application, Provide the web page address of the instructables (If more than one Instructables then provide the address in the new line as shown in the pic) that you wish the tool to read the count in the box (Refer Pic 2)

2. Check the 'Talk to me' check box if the tool has to read the score out loud (Refer Pic 3)

3. Click on the 'Start' button (Refer Pic 3)

4. In couple of seconds, application will get the views and favorite counts of the instructable and displays it in the application

Note: The script runs every 1 minute automatically and displays the result until closed. It can be changed in the below line in attached .hta file

iTimerID = window.setInterval("GetCount", 60000) ' Where 60000 is 1 minute

Disclaimer:

The 'Automatic Instructables View and Favorite Checker' is a tool developed for the demonstration purpose only. Tool is developed and tested with real time data and the accuracy of the result may vary.