Hello Oleg,
I have a simple problem, I'm trying to automate a task,
here is an example of what I want to do:
I am trying to copy embed codes from various source types
such as megavideo, myspace, veoh, facebook and more, I
want to insert it into my wordpress "add-new" post area.
Here is an example:
URL: view-source:http://www.animefushigi.com/aria-the-
origination-episode-7
Here is the embed code:
<embed type="application/x-shockwave-flash"
allowfullscreen="true" wmode="transparent" width="100%"
height="450"
src="http://wwwstatic.megavideo.com/mv_player.swf?
image=http://www.animefushigi.com/images/splash-
mega.jpg&v=5DX2KENP" /></embed>
I want to extract only "5DX2KENP" and insert it into my
coding in my wordpress like this:
[megavideo 5DX2KENP]
How can I accomplish this??
Need Help With String Extract Function
-
- Posts: 13
- Joined: Fri Jan 28, 2011 3:09 pm
- Location: United Kingdom
Need Help With String Extract Function
See this example, please.
It extracts the image code from the URL.
BTW: the char "&" is written as "&" in the page code. Therefore this task searches the string between strings:
/images/splash-mega.jpg]&v=
and
"
It extracts the image code from the URL.
BTW: the char "&" is written as "&" in the page code. Therefore this task searches the string between strings:
/images/splash-mega.jpg]&v=
and
"
-
- Posts: 13
- Joined: Fri Jan 28, 2011 3:09 pm
- Location: United Kingdom
Need Help With String Extract Function
Hello Oleg,
Thanks for the code, I now have a basic idea of how it works, however I want to know if it's possible for it to automatically grab the entire source and put it in the Set Variable STR function??
If not would I have to manually enter the entire source per page?
Also one other thing, each source type is different and requires different parts of each code to work, how would i go about configuring robotask to know each source type depending on the STR I set?
Thanks for the code, I now have a basic idea of how it works, however I want to know if it's possible for it to automatically grab the entire source and put it in the Set Variable STR function??
If not would I have to manually enter the entire source per page?
Also one other thing, each source type is different and requires different parts of each code to work, how would i go about configuring robotask to know each source type depending on the STR I set?
Need Help With String Extract Function
You can use "Download file" action
It can download HTML page as well as some binary file
Use URL
http://www.animefushigi.com/aria-the-or ... -episode-7
and save it as some TXT or HTML file.
Next, you can use system variable {TextFile(c:\SomeTextFile.txt)} in order to retrieve the text content.
It can download HTML page as well as some binary file
Use URL
http://www.animefushigi.com/aria-the-or ... -episode-7
and save it as some TXT or HTML file.
Next, you can use system variable {TextFile(c:\SomeTextFile.txt)} in order to retrieve the text content.
-
- Posts: 13
- Joined: Fri Jan 28, 2011 3:09 pm
- Location: United Kingdom
Need Help With String Extract Function
Thanks Oleg, That Worked Great!
I'm having another minor issue with this example:
URL: http://www.animefushigi.com/letter-bee- ... episode-17
This source type is facebook, the code looks like this:
PART 1:
<embed src= "http://static.ak.fbcdn.net/rsrc.php/z4O ... kbs3nb.swf ?thumb_url=http://www.animefushigi.com/images/splash-flb.jpg &video_owner_name=MIHAWK&video_owner_href=http://www .animefushigi.com&highqual_is_on=1&video_src=http:// video.ak.fbcdn.net/cfs-ak-ash1/79097/952/122548787818676_346 13.mp4&video_title=ANIMEFUSHIGI_OWNS&v=1337" width="100%" height="365" allowFullScreen="true" type="application/x-shockwave-flash" wmode="transparent"></embed>
PART 2:
</center></p><p><center><embed src= "http://static.ak.fbcdn.net/rsrc.php/z4O ... kbs3nb.swf ?thumb_url=http://www.animefushigi.com/images/splash-flb.jpg &video_owner_name=MIHAWK&video_owner_href=http://www .animefushigi.com&highqual_is_on=1&video_src=http:// video.ak.fbcdn.net/cfs-ak-ash1/79139/989/122549054485316_158 16.mp4&video_title=ANIMEFUSHIGI_OWNS&v=1337" width="100%" height="365" allowFullScreen="true" type="application/x-shockwave-flash" wmode="transparent"></embed>
There are two different variables here, how do I go about entering this in the string?
I want my end result to be:
Part 1 : http://video.ak.fbcdn.net/cfs-ak-ash1/7 ... 2548787818 676_34613.mp4
Part 2: http://video.ak.fbcdn.net/cfs-ak-ash1/7 ... 2549054485 316_15816.mp4
Please help, Thanks
I'm having another minor issue with this example:
URL: http://www.animefushigi.com/letter-bee- ... episode-17
This source type is facebook, the code looks like this:
PART 1:
<embed src= "http://static.ak.fbcdn.net/rsrc.php/z4O ... kbs3nb.swf ?thumb_url=http://www.animefushigi.com/images/splash-flb.jpg &video_owner_name=MIHAWK&video_owner_href=http://www .animefushigi.com&highqual_is_on=1&video_src=http:// video.ak.fbcdn.net/cfs-ak-ash1/79097/952/122548787818676_346 13.mp4&video_title=ANIMEFUSHIGI_OWNS&v=1337" width="100%" height="365" allowFullScreen="true" type="application/x-shockwave-flash" wmode="transparent"></embed>
PART 2:
</center></p><p><center><embed src= "http://static.ak.fbcdn.net/rsrc.php/z4O ... kbs3nb.swf ?thumb_url=http://www.animefushigi.com/images/splash-flb.jpg &video_owner_name=MIHAWK&video_owner_href=http://www .animefushigi.com&highqual_is_on=1&video_src=http:// video.ak.fbcdn.net/cfs-ak-ash1/79139/989/122549054485316_158 16.mp4&video_title=ANIMEFUSHIGI_OWNS&v=1337" width="100%" height="365" allowFullScreen="true" type="application/x-shockwave-flash" wmode="transparent"></embed>
There are two different variables here, how do I go about entering this in the string?
I want my end result to be:
Part 1 : http://video.ak.fbcdn.net/cfs-ak-ash1/7 ... 2548787818 676_34613.mp4
Part 2: http://video.ak.fbcdn.net/cfs-ak-ash1/7 ... 2549054485 316_15816.mp4
Please help, Thanks

-
- Posts: 13
- Joined: Fri Jan 28, 2011 3:09 pm
- Location: United Kingdom
Need Help With String Extract Function
Oleg, I was able to improvise on the string to extract both parts!
Thank you so much for your help, I will be posting again if I have any problems. 


-
- Posts: 13
- Joined: Fri Jan 28, 2011 3:09 pm
- Location: United Kingdom
Need Help With String Extract Function
Hello Again Oleg,
I am still having the same issue with part 1 and part 2 of
a source, sometimes the coding is so similar that it doesn't pickup the second part. How can I grab both
variables without duplicating the first one?
I am still having the same issue with part 1 and part 2 of
a source, sometimes the coding is so similar that it doesn't pickup the second part. How can I grab both
variables without duplicating the first one?
Need Help With String Extract Function
I think that you need create separate task (template) for each site you need.
Regarding to part1 and part1:
you need extract string between
http://video.ak.fbcdn.net/cfs-ak-ash1/
and
.mp4
Suppose you assign the result to MyVar.
So the whole address will be
http://video.ak.fbcdn.net/cfs-ak-ash1/{MyVar}.mp4
Regarding to part1 and part1:
you need extract string between
http://video.ak.fbcdn.net/cfs-ak-ash1/
and
.mp4
Suppose you assign the result to MyVar.
So the whole address will be
http://video.ak.fbcdn.net/cfs-ak-ash1/{MyVar}.mp4
Last edited by Oleg on Sun Jan 30, 2011 5:41 am, edited 1 time in total.
-
- Posts: 13
- Joined: Fri Jan 28, 2011 3:09 pm
- Location: United Kingdom
Need Help With String Extract Function
Thanks For The Idea, however the problem is the strings chosen change often for example:http://video.ak.fbcdn.net/cfs-ak-ash1/
would sometimes change to this:
http://video.l3.fbcdn.net/cfs-ak-ash2/
The Entire URL from http:// to .mp4 changes on a regular, also some sources are from myspace and not facebook. Any other ideas?
would sometimes change to this:
http://video.l3.fbcdn.net/cfs-ak-ash2/
The Entire URL from http:// to .mp4 changes on a regular, also some sources are from myspace and not facebook. Any other ideas?
Need Help With String Extract Function
This means that you should check both (all possible) variants.