Extracting link doesn't work in certain case

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

Extracting link doesn't work in certain case

by Bassoo7 on Fri Jun 30, 2017 4:21 pm

I'm working in a website that has an unusual link formation.
Example of a link
Code: Select all
<a data-test="xxxx" class="ABC" href="/skill/Basics">

iMacros fails to extract the link from this element. I can't figure out the full URL from the href, it only returns '/skill/Basics' instead of 'www.website.com/skill/Basics'

I've tested other website and they all work.
I'm suspecting iMacros has a bug which prevents it from extract links in <a> elements whose href doesn't end with / like href="/skill/Basics/" or doesn't start with . like href="./skill/Basics"
MY Config: iMacros Browser 11.5 DESKTOP; Windows 7
Bassoo7
 
Posts: 5
Joined: Tue May 30, 2017 12:22 pm

Re: Extracting link doesn't work in certain case

by chivracq on Fri Jun 30, 2017 7:05 pm

Bassoo7 wrote:MY Config:
Code: Select all
iMacros Browser 11.5 DESKTOP; Windows 7


I'm working in a website that has an unusual link formation.
Example of a link
Code: Select all
<a data-test="xxxx" class="ABC" href="/skill/Basics">

iMacros fails to extract the link from this element. I can't figure out the full URL from the href, it only returns '/skill/Basics' instead of 'www.website.com/skill/Basics'

I've tested other website and they all work.
I'm suspecting iMacros has a bug which prevents it from extract links in <a> elements whose href doesn't end with / like href="/skill/Basics/" or doesn't start with . like href="./skill/Basics"

Mini-Remark:
Perfect that you mention your FCI in your Sig, but hum..., you should still hard-code it in each Opening Post for each Thread as you only have one dynamic Sig for the whole Forum and those Threads will look a bit confusing to sbd reading them in a few weeks/months/years and you will then have updated your Sig to your current FCI at that time...

>>>

Concerning your Pb, I cannot test as you didn't provide the URL of your Site/Page and I cannot find Examples of such Links...
=> If you could provide that Info or find some similar Site...?
(Even if, hum, I don't use the iMB, I only use iMacros for FF, so I'll only be able to test on FF...)

But, it shouldn't be difficult to "reconstruct" the whole URL from the 'HREF' Extract + using the Domain part of the URL from '!URLCURRENT' for example... (Using 'ADD' or 'EVAL()'.)

>>>

Oh...!, I found such a Link, ah-ah...! Or at least without the leading Dot, and on FB actually, thanks to using some Browser that FB considers not supported, pfff...! :roll: :
Code: Select all
VERSION BUILD=8820413 RECORDER=FX
TAB T=1
URL GOTO=https://www.facebook.com/events/upcoming

TAG POS=1 TYPE=A ATTR=TXT:update<SP>your<SP>browser EXTRACT=HTM
'=> Extracted: <a style="outline: 1px solid blue;" href="/unsupportedbrowser">update your browser</a>

TAG POS=1 TYPE=A ATTR=TXT:update<SP>your<SP>browser EXTRACT=HREF
'=> Extracted: https://www.facebook.com/unsupportedbrowser
(Tested on iMacros for FF v8.8.2, Pale Moon v26.3.3 (=FF47), Win10-x64.)

=> I cannot reproduce your Pb, the complete URL gets extracted for me with 'EXTRACT=HREF'...

I have another Environment with iMacros for FF v8.9.7 + FF54 but I cannot test because I don't get the Link on this "supported" Browser...
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6477
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)


Return to General Support & Discussions

Who is online

Users browsing this forum: chivracq and 9 guests

-->