Colon Distrupting The Extraction!!

Discussions and Tech Support related to website data extraction, screen scraping and data mining using iMacros.
Forum rules
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team

Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
kambingjantan
Posts: 9
Joined: Tue Nov 21, 2017 10:42 pm

Colon Distrupting The Extraction!!

Post by kambingjantan » Sat Jan 06, 2018 2:07 pm

Firefox 55; imacros 8.9.7 ; Windows 7

I have been really familiar in coding in imacros, but
This is something new to me.
I found this kind of ID naming,

Code: Select all

<div class="_4-u2 mbm _4mrt _5jmm _5pat _5v3q _4-u8" data-fte="1" data-ftr="1" id="mall_post_1988260348080319:6:0" role="article"
Point here: mall_post_1988260348080319:6:0

And next problem, I can only use EVENT Javascript imacros to get it work.
So what I have done,

Extracting ID, and then assigned it to code like this

Code: Select all

iimPlayCode (
	"EVENT TYPE=CLICK SELECTOR=\"#mall_post_"+ something +":6:0>DIV>DIV>DIV:nth-of-type(2)>DIV>DIV>DIV>DIV>DIV>DIV>DIV>DIV>SPAN:nth-of-type(1)>DIV>A\" BUTTON=0" + ln
);
Point here: SELECTOR=\"#mall_post_"+ something +":6:0

Notice the bolded stuff? Yeah you can then assume it won't work. The error message was this,
"Syntax error. [this is line of code] is not a valid selector, line 1 (Error code: -1001)"

I am not sure if I missed some other technique to do this. But really I was really sad if it couldn't be done.
Thanks!
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Colon Distrupting The Extraction!!

Post by chivracq » Sat Jan 06, 2018 10:37 pm

kambingjantan wrote:

Code: Select all

Firefox 55; imacros 8.9.7 ; Windows 7
I have been really familiar in coding in imacros, but
This is something new to me.
I found this kind of ID naming,

Code: Select all

<div class="_4-u2 mbm _4mrt _5jmm _5pat _5v3q _4-u8" data-fte="1" data-ftr="1" id="mall_post_1988260348080319:6:0" role="article"
Point here: mall_post_1988260348080319:6:0

And next problem, I can only use EVENT Javascript imacros to get it work.
So what I have done,

Extracting ID, and then assigned it to code like this

Code: Select all

iimPlayCode (
	"EVENT TYPE=CLICK SELECTOR=\"#mall_post_"+ something +":6:0>DIV>DIV>DIV:nth-of-type(2)>DIV>DIV>DIV>DIV>DIV>DIV>DIV>DIV>SPAN:nth-of-type(1)>DIV>A\" BUTTON=0" + ln
);
Point here: SELECTOR=\"#mall_post_"+ something +":6:0

Notice the bolded stuff? Yeah you can then assume it won't work. The error message was this,
"Syntax error. [this is line of code] is not a valid selector, line 1 (Error code: -1001)"

I am not sure if I missed some other technique to do this. But really I was really sad if it couldn't be done.
Thanks!
Hum..., a bit surprised by your RuntimeError, I think the 'SELECTOR' Parameter is not supported/has not been implemented yet by/in iMacros for FF... But I'm a bit confused/unsure because the Error is a bit different from what I recall... :?

But OK anyway, I would have 1 or 2 Workarounds for Situations like yours..., never (really) needed that exact Functionality but was very "close" once a few months ago, so I already did "the Thinking", ah-ah...! :wink:
:arrow: But, hum, pfff..., way too cumbersome to try to explain it in Words..., post a Site with URL and EXACT Steps of what you EXACTLY want... :P

:arrow: But hum..., normally my first Reply in a Thread is a Reply to its Title..., (I read your Post and my Reply is a Reply to that Content), but to be honest, your Thread Title "Colon Distrupting The Extraction!!" doesn't make any sense to me..., "Distrup_whatever" is no English as a start :roll: (and nbd will be using that (Key)Word to search the Forum), but even, I simply don't understand your Thread Title in combination with the Content of your Post...
=> If you can give a(real) Descriptive Thread Title...? (Or explain..., maybe I missed stg..., but if I got confused, Users searching the Forum usually put 1-2 sec to a Thread from its Title if it might be relevant to their Scenario/Search to decide if they are going to open/check it.)
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Colon Distrupting The Extraction!!

Post by chivracq » Mon Jan 08, 2018 2:02 am

Hum..., I made a "mess" of my previous Reply, ah-ah...! Of course the 'SELECTOR' Parameter is correct when using the 'CLICK' Command on the 'EVENT' Mode... I got confused by the (new) 'SELECTOR' Parameter for the 'TAG' Mode instead... :oops:

=> Then OK, I think the '>' Chars in your ">DIV>DIV>etc..." also need to be escaped... (like you already do for the Double Quotes). :idea:
=> It's the '>' which is "disrupting" the Extraction, and not the Colon..., now I understand your Thread Title... :)

>>>

For those interested, parallel Thread on SOF... (with the same Typo as well, but with a little bit more Explanation about the "Colon" part):
https://stackoverflow.com/questions/481 ... cros-event
(No Replies yet...)
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Colon Distrupting The Extraction!!

Post by chivracq » Tue Jan 16, 2018 12:41 am

Hum..., 10 days later..., and no Follow-up...!? Not too impressed, but OK, never mind... :shock:
(Still no Replies/Answers on SOF btw...)
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Post Reply