How to remove string in a EXTRACT

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
zluuminhz
Posts: 1
Joined: Wed Aug 03, 2016 2:56 pm

How to remove string in a EXTRACT

Post by zluuminhz » Wed Aug 03, 2016 4:46 pm

This is my code

Code: Select all

SET !EXTRACT_TEST_POPUP NO
URL GOTO=https://www.youtube.com/results?search_query=Calvin+Harris+-+This+Is+What+You+Came+For+%28Official+Video%29+ft.+Rihanna
TAG POS=1 TYPE=A ATTR=CLASS:yt-uix-sessionlink<SP>yt-uix-tile-link<SP>yt-ui-ellipsis<SP>yt-ui-ellipsis-2<SP><SP><SP><SP><SP><SP><SP>spf-link<SP> EXTRACT=HREF
SAVEAS TYPE=EXTRACT FOLDER=* FILE=*
I've extracted a csv file content is "https://www.youtube.com/watch?v=kOkQ4T5WO9E"
but I just want to get content is "kOkQ4T5WO9E"
what should I do?

I'm sorry, my english is bad.
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: How to remove string in a EXTRACT

Post by chivracq » Wed Aug 03, 2016 7:06 pm

zluuminhz wrote:This is my code

Code: Select all

SET !EXTRACT_TEST_POPUP NO
URL GOTO=https://www.youtube.com/results?search_query=Calvin+Harris+-+This+Is+What+You+Came+For+%28Official+Video%29+ft.+Rihanna
TAG POS=1 TYPE=A ATTR=CLASS:yt-uix-sessionlink<SP>yt-uix-tile-link<SP>yt-ui-ellipsis<SP>yt-ui-ellipsis-2<SP><SP><SP><SP><SP><SP><SP>spf-link<SP> EXTRACT=HREF
SAVEAS TYPE=EXTRACT FOLDER=* FILE=*
I've extracted a csv file content is "https://www.youtube.com/watch?v=kOkQ4T5WO9E"
but I just want to get content is "kOkQ4T5WO9E"
what should I do?

I'm sorry, my english is bad.
CIM...! :mrgreen: (... for me to read, read my Sig...)

=> Use 'EVAL()' + 'replace()' I would think, based on your Thread Title... :idea:
- (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