Colon Distrupting The Extraction!!

Discussions and Tech Support related to website data extraction, screen scraping and data mining using iMacros.

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.

Colon Distrupting The Extraction!!

by kambingjantan on Sat Jan 06, 2018 7:07 am

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!
kambingjantan
 
Posts: 9
Joined: Tue Nov 21, 2017 3:42 pm

Re: Colon Distrupting The Extraction!!

by chivracq on Sat Jan 06, 2018 3: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)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: 6873
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Colon Distrupting The Extraction!!

by chivracq on Sun Jan 07, 2018 7:02 pm

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)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: 6873
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Colon Distrupting The Extraction!!

by chivracq on Mon Jan 15, 2018 5:41 pm

Hum..., 10 days later..., and no Follow-up...!? Not too impressed, but OK, never mind... :shock:
(Still no Replies/Answers on SOF btw...)
- (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: 6873
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)


Return to Data Extraction and Web Screen Scraping

Who is online

Users browsing this forum: No registered users and 5 guests

-->