Selecte text from paragraph

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.

Selecte text from paragraph

by marion on Wed Jan 18, 2017 1:02 am

Hi,
I'm using the Firefox Extension(9.0.3) an Firefox 50.1.0

I have folowing HTML:
Code: Select all
<p>
first line<br /> second line<br /> E-Mail: <a href="mailto:test@web.com">test@web.com</a><br>  <a href="http://www.web.com" target="_blank">http://www.web.com</a><br> <br />
</p>


I have following imacro:
Code: Select all
TAG POS=1 TYPE=P ATTR=TXT:* EXTRACT=TXT


When I extract this - on position of the links the text reepats from top:
Code: Select all
first line
second line
E-Mail:first line
second line
E-Mail:test@web.com
first line
second line
E-Mail:first line
second line
E-Mail:test@web.com
http://www.web.com


How can I avoid this? What am I doing wrong?

Thanks for your help
marion
 
Posts: 1
Joined: Wed Jan 18, 2017 12:54 am

Re: Selecte text from paragraph

by chivracq on Wed Jan 18, 2017 9:05 am

marion wrote:Hi,
I'm using the
Code: Select all
Firefox Extension(9.0.3) an Firefox 50.1.0


I have folowing HTML:
Code: Select all
<p>
first line<br /> second line<br /> E-Mail: <a href="mailto:test@web.com">test@web.com</a><br>  <a href="http://www.web.com" target="_blank">http://www.web.com</a><br> <br />
</p>


I have following imacro:
Code: Select all
TAG POS=1 TYPE=P ATTR=TXT:* EXTRACT=TXT


When I extract this - on position of the links the text reepats from top:
Code: Select all
first line
second line
E-Mail:first line
second line
E-Mail:test@web.com
first line
second line
E-Mail:first line
second line
E-Mail:test@web.com
http://www.web.com


How can I avoid this? What am I doing wrong?

Thanks for your help

Extracting paragraph with links in it

Posted by marion on 18 Jan 2017, 10:46

Hi,

Code: Select all
Firefox-Version: 50.1.0
iMacros-Version- Addon for Firefox: 9.0.3


I want to extract a text from a paragraph.

This is the html:
Code: Select all
    <p>
    first line<br /> second line<br /> E-Mail: <a href="mailto:test@web.com">test@web.com</a><br>  <a href="http://www.web.com" target="_blank">http://www.web.com</a><br> <br />
    </p>


This is my code for iMacro:
Code: Select all
    TAG POS=1 TYPE=P ATTR=TXT:* EXTRACT=TXT


I'am expecting this:
Code: Select all
    first line
    second line
    E-Mail: test@web.com
    http://www.web.com


But I get:
Code: Select all
    first line
    second line
    E-Mail:first line
    second line
    E-Mail:test@web.com
    first line
    second line
    E-Mail:first line
    second line
    E-Mail:test@web.com
    http://www.web.com

I can't understand this. Am I doing something wrong? I can I avoid this?

No need to try to spam the Forum by opening Duplicates of your Thread in different Sub-Forums, this current Thread is enough in the 'Data Extraction' Sub-Forum, I've deleted your Duplicate Thread in the 'FF' Sub-Forum as one is enough and your Qt has nothing specific to ONLY iMacros for FF... :roll:

OS is missing btw from your FCI, even if it won't play a role for this current Thread, but FCI = iMacros + Browser + OS.

URL not posted, I cannot test on the Page/Site myself but I suspect that from removing the Content of the 'TXT' Attribute on the 'P' Element you are trying to extract, you now extract some other Hidden 'P' Element higher in the "POS=n" HTML Structure of the Page and the 'P' Element you are trying to extract has now shifted to "POS=2" or "POS=3" etc...

Other Method, your 'P' Element is probably contained in some 'DIV' Element, would be to extract that 'DIV' Element at the higher Level on its Class ID for example...
- (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: 6131
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 3 guests

-->