Extract Shortened Link with imacros - extract

I am new to imacros scripting and I want to extract a shortened link on gg.gg. This is my test script:
SET !ERRORIGNORE YES
SET !TIMEOUT_STEP 3
SET !EXTRACT_TEST_POPUP YES
TAG XPATH="//result-box[#id="short-url"] EXTRACT=TXT
PROMPT {{!EXTRACT}}
PAUSE
But it still gives a null result. Can anyone help me? Thanks in advance.

Try this line:
TAG XPATH="//*[#id='short-url']" EXTRACT=TXT

Related

Visual Studio Code HTML template with Exclamation Mark

when I write ! but now auto complete HTML Template you can help me please
if you look image you can see
the plugin for html has been deprecated, you can input html5 and get the tip of template
Yes, the same happened to me a few days ago. Your emmet (or other settings) are just fine. Actually, VS Code isn't supporting '!' for HTML SYNTAX anymore.
Try typing HTML:5 to get an autocomplete option.
OR, you might just use 'doc' instead of '!' as well. Both work fine.
first make sure that Emmet: Trigger on Tab is checked.
Then instead of typing ! then Enter key, type ! then the tab key.
enter image description here

How to Extract data from a google drive link with iMacros?

I am using iMacros for automating some form filling web task.
To avoid hard-coding certain parameters, i had planned to place the parameters in a htm file, and extract the parameters online before starting with the rest of the scripts. This way i believe, i can maintain the parameters across multiple instances running of the script, from a single place.
However, I have come across a problem, while extracting the htm file that I uploaded to google drive.
Below is the link that i want to extract data from.
https://drive.google.com/file/d/0B_GgQPGYiDg8UVBTOEYyVGk1Yk0
But looks neither the EXTRACT command nor the iMacro browser is able to extract the contents from this link.
One alternative is to host the htm file on any free web hosting platform. Buy it doesn't seems to be worth for a single file. There should be any alternate simple solution to this.
Hint: When I view source of the page, I see no tag that contains my data. Only some javascript functions.
If you want to stay with drive you can extract all the content of that file with
TAG POS=1 TYPE=DIV ATTR=class:drive-viewer-text-content EXTRACT=TXT
You will get the full HTML Code inside your file and have to parse that for the data you want. If you only really need the data in the TDs, would making it a plain text file work for you? Then you could place the individual TD contents in a single line each to make parsing your extracted data easier.
I think its better you simplify the parameters and just keep it as an array. IMacros is able to extract the text easily. Please find below my code, where I extract the text and did some basic processing and finally returned an array with the parameters.
CODE:
VERSION BUILD=9030808 RECORDER=FX
SET !EXTRACT_TEST_POPUP NO
SET !TIMEOUT_PAGE 10
URL GOTO=https://drive.google.com/file/d/0B_GgQPGYiDg8UVBTOEYyVGk1Yk0/edit
TAG POS=1 TYPE=PRE ATTR=TXT:<?xml<SP>version="1.0"?><html><SP><head><SP><title>Parameter* EXTRACT=TXT
SET !VAR1 EVAL("var s='{{!EXTRACT}}';s=s.match(/<TD>([^<]+)<.TD>/gm);s=s.map(e => e.replace('<TD>', '').replace('</TD>', ''));s;")
PROMPT {{!VAR1}}
OUTPUT:
am|am|Yes|Blocked by Administrator|Y|Y|Y|N|N|N|N|N|N|N|N|N|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y
,
pm|pm|Yes|Blocked by Administrator|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y|N|N|N|N|N|N|N|N|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y
,
dt|dt|Yes|Blocked by Administrator|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y|Y

Cannot get htmlproofer to ignore missing image alt tags

I'm running htmlproofer to check a WIP Jekyll-generated site that currently has a lot of missing image tags. I'd like to ignore the for the time being until other broken links are resolved. I expected this pattern would work:
bundle exec htmlproofer ./_site --assume-extension --empty-alt-ignore --disable-external
However it still returns errors for missing alt tags. What am I doing wrong?
Passing --alt-ignore '/.*/' instead of --empty-alt-ignore should help you.
--empty-alt-ignore is for ignoring alt tags set to ""

iMacros can't write comments in Disqus.com

I recently started using iMacros to automate tasks in Disqus.com. After using it to fill in Sign Up forms automatically (Page can be found here) everything seemed fine, the record function recorded exactly what I was inputting and I could play it just fine. For instance I got this:
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:login-form ATTR=ID:display-name-input CONTENT=josephbeadles
But when I went to an actual disqus blog (If you want to try it yourself here is one) and tried to record me typing something, it recorded nothing. First you have to click "Join the Discussion" and when I typed nothing was recorded. However when I clicked it a second time I got other code which I think is what I want, but it still doesn't record it. I think it might be because the sign up forms are of type INPUT:TEXT while the comment forms are of a different type. when clicking "Join the Discussion" twice I got these 2 things:
TAG POS=1 TYPE=SPAN ATTR=TXT:Join<SP>the<SP>discussion…
TAG POS=1 TYPE=P ATTR=TXT:
As you can see it doesn't record what I write. I then tried recording a reply, and this time it gave me some really long thing:
TAG POS=2 TYPE=SPAN ATTR=TXT:Reply
TAG POS=2 TYPE=DIV ATTR=CONTENTEDITABLE:true&&CLASS:textarea&&TABINDEX:0&&ROLE:textbox&&ARIA-MULTILINE:true&&DATA-ROLE:editable&&ARIA-LABEL:Join<SP>the<SP>discussion…&&TXT:
So now I think that it might be because it is of type div. But I have no idea how I can input text into one of these forms, so I came here for help.
Thanks in advance.

Remove output-escaping in xslt

tag is added to the text if i set format as "Text". i want to remove this tag programatically.
Is there any way to convert the string from text format to Rich text format programatically.
I know we can do it by clicking the smart tag and selecting format as "richtext", however problem with this is it will not display the tag in string but its present on the page (check by view source) and it effects my html/css which i want to render. i.e even if i change format it adds extra to my html which i want to eliminate.
Please suggest.
Thanks in advance
Cheers!!
Ketan
add the following attribute:
disable-output-escaping="yes"