Jump to content

How to select a special phrase on a complete text!?


anunes
 Share

Recommended Posts

Hi, I was trying to do a script that copy just a specify text in the SourceCode of a web page... I just have no idea how to start this program, someone can help me?

What I want is something like this:

01 - The One With Ross' New Girlfriend - <a href="http://usercash.com/go/1/20643/http://www.megaupload.com/?d=AL8BH29Q" target="_blank"><font color="blue"><b>MegaUpload 1</b></font></a> / <a href="http://usercash.com/go/1/20643/http://www.megaupload.com/?d=U7UH0IF9" target="_blank"><font color="blue"><b>MegaUpload 2</b></font></a> // <a href="http://usercash.com/go/1/20643/http://rapidshare.com/files/125976717/_Friends_2x01_Up_by_AlienwareRlz_www.playanimes.net.avi.001" target="_blank"><font color="black"><b>Rapidshare 1</b></font></a> / <a href="http://usercash.com/go/1/20643/http://rapidshare.com/files/125976659/_Friends_2x01_Up_by_AlienwareRlz_www.playanimes.net.avi.002" target="_blank"><font color="black"><b>Rapidshare 2</b></font></a><br />
02 - The One With the Breast Milk - <a href="http://usercash.com/go/1/20643/http://www.megaupload.com/?d=B5UP4U6J" target="_blank"><font color="blue"><b>MegaUpload 1</b></font></a> / <a href="http://usercash.com/go/1/20643/http://www.megaupload.com/?d=AD0B84LY" target="_blank"><font color="blue"><b>MegaUpload 2</b></font></a> // <a href="http://usercash.com/go/1/20643/http://rapidshare.com/files/125976770/_Friends_2x02_Up_by_AlienwareRlz_www.playanimes.net.avi.001" target="_blank"><font color="black"><b>Rapidshare 1</b></font></a> / <a href="http://usercash.com/go/1/20643/http://rapidshare.com/files/125976586/_Friends_2x02_Up_by_AlienwareRlz_www.playanimes.net.avi.002" target="_blank"><font color="black"><b>Rapidshare 2</b></font></a><br />
03 - The One Where Heckles Dies - <a href="http://usercash.com/go/1/20643/http://www.megaupload.com/?d=IPP85ZXV" target="_blank"><font color="blue"><b>MegaUpload 1</b></font></a> / <a href="http://usercash.com/go/1/20643/http://www.megaupload.com/?d=JX9D4B80" target="_blank"><font color="blue"><b>MegaUpload 2</b></font></a> // <a href="http://usercash.com/go/1/20643/http://rapidshare.com/files/125976752/_Friends_2x03_Up_by_AlienwareRlz_www.playanimes.net.avi.001" target="_blank"><font color="black"><b>Rapidshare 1</b></font></a> / <a href="http://usercash.com/go/1/20643/http://rapidshare.com/files/125976713/_Friends_2x03_Up_by_AlienwareRlz_www.playanimes.net.avi.002" target="_blank"><font color="black"><b>Rapidshare 2</b></font></a><br />
04 - The One With Phoebe's Husband - <a href="http://usercash.com/go/1/20643/http://www.megaupload.com/?d=7AR36UU9" target="_blank"><font color="blue"><b>MegaUpload 1</b></font></a> / <a href="http://usercash.com/go/1/20643/http://www.megaupload.com/?d=BIEQV08R" target="_blank"><font color="blue"><b>MegaUpload 2</b></font></a> // <a href="http://usercash.com/go/1/20643/http://rapidshare.com/files/125976740/_Friends_2x04_Up_by_AlienwareRlz_www.playanimes.net.avi.001" target="_blank"><font color="black"><b>Rapidshare 1</b></font></a> / <a href="http://usercash.com/go/1/20643/http://rapidshare.com/files/125976709/_Friends_2x04_Up_by_AlienwareRlz_www.playanimes.net.avi.002" target="_blank"><font color="black"><b>Rapidshare 2</b></font></a><br />
05 - The One With Five Steaks and an Eggplant - <a href="http://usercash.com/go/1/20643/http://www.megaupload.com/?d=QZPAZ5NJ" target="_blank"><font color="blue"><b>MegaUpload 1</b></font></a> / <a href="http://usercash.com/go/1/20643/http://www.megaupload.com/?d=NBMNVLD6" target="_blank"><font color="blue"><b>MegaUpload 2</b></font></a> // <a href="http://usercash.com/go/1/20643/http://rapidshare.com/files/125976979/_Friends_2x05_Up_by_AlienwareRlz_www.playanimes.net.avi.001" target="_blank"><font color="black"><b>Rapidshare 1</b></font></a> / <a href="http://usercash.com/go/1/20643/http://rapidshare.com/files/125976957/_Friends_2x05_Up_by_AlienwareRlz_www.playanimes.net.avi.002" target="_blank"><font color="black"><b>Rapidshare 2</b></font></a><br />

Copying just the http:// MegaUpload links with the after "?d=" code... and paste it on a blank notepad...

Please, any idea?

Thanks

Edited by anunes
Link to comment
Share on other sites

Can use be more specific about after which ?d= one you want? Maybe you give a clue about which tag(s) in the source preceding it?

Edit:

#include <Array.au3>

Dim $sSource = '02 - The One With the Breast Milk - <a href="http://usercash.com' & _
               '/go/1/20643/http://www.megaupload.com/?d=B5UP4U6J" target="_blan' & _
               'k"><font color="blue"><b>MegaUpload 1</b></font></a> / <a href="' & _
               'http://usercash.com/go/1/20643/http://www.megaupload.com/?d=AD0B' & _
               '84LY" target="_blank"><font color="blue"><b>MegaUpload 2</b></fo' & _
               'nt></a> // <a href="http://usercash.com/go/1/20643/http://rapids' & _
               'hare.com/files/125976770/_Friends_2x02_Up_by_AlienwareRlz_www.pl' & _
               'ayanimes.net.avi.001" target="_blank"><font color="black"><b>Rap' & _
               'idshare 1</b></font></a> / <a href="http://usercash.com/go/1/206' & _
               '43/http://rapidshare.com/files/125976586/_Friends_2x02_Up_by_Ali' & _
               'enwareRlz_www.playanimes.net.avi.002" target="_blank"><font colo' & _
               'r="black"><b>Rapidshare 2</b></font></a><br />' & _
               '03 - The One Where Heckles Dies - <a href="http://usercash.com/g' & _
               'o/1/20643/http://www.megaupload.com/?d=IPP85ZXV" target="_blank"' & _
               '><font color="blue"><b>MegaUpload 1</b></font></a> / <a href="ht' & _
               'tp://usercash.com/go/1/20643/http://www.megaupload.com/?d=JX9D4B' & _
               '80" target="_blank"><font color="blue"><b>MegaUpload 2</b></font' & _
               '></a> // <a href="http://usercash.com/go/1/20643/http://rapidsha' & _
               're.com/files/125976752/_Friends_2x03_Up_by_AlienwareRlz_www.play' & _
               'animes.net.avi.001" target="_blank"><font color="black"><b>Rapid' & _
               'share 1</b></font></a> / <a href="http://usercash.com/go/1/20643' & _
               '/http://rapidshare.com/files/125976713/_Friends_2x03_Up_by_Alien' & _
               'wareRlz_www.playanimes.net.avi.002" target="_blank"><font color=' & _
               '"black"><b>Rapidshare 2</b></font></a><br />' & _
               '04 - The One With Phoebe''s Husband - <a href="http://usercash.c' & _
               'om/go/1/20643/http://www.megaupload.com/?d=7AR36UU9" target="_bl' & _
               'ank"><font color="blue"><b>MegaUpload 1</b></font></a> / <a hre' & _
               'f="http://usercash.com/go/1/20643/http://www.megaupload.com/?d=' & _
               'BIEQV08R" target="_blank"><font color="blue"><b>MegaUpload 2</b' & _
               '></font></a> // <a href="http://usercash.com/go/1/20643/http://' & _
               'rapidshare.com/files/125976740/_Friends_2x04_Up_by_AlienwareRlz' & _
               '_www.playanimes.net.avi.001" target="_blank"><font color="black' & _
               '"><b>Rapidshare 1</b></font></a> / <a href="http://usercash.com' & _
               '/go/1/20643/http://rapidshare.com/files/125976709/_Friends_2x04' & _
               '_Up_by_AlienwareRlz_www.playanimes.net.avi.002" target="_blank"' & _
               '><font color="black"><b>Rapidshare 2</b></font></a><br />'
               
Dim $sPattern = '(?i)(http://www.megaupload.com/[^"]+)" target'
Dim $Arr = StringRegExp($sSource, $sPattern, 3)

If IsArray($Arr) Then
    Local $hFile = FileOpen(@ScriptDir & '\' & @MDAY & '-' & @MON & '-' &  @YEAR & '.txt', 1)
    
    For $i = 0 To UBound($Arr)-1
        FileWriteLine($hFile, $Arr[$i])
    Next
    
    FileClose($hFile)
EndIf
Edited by Authenticity
Link to comment
Share on other sites

Hi, I was trying to do a script that copy just a specify text in the SourceCode of a web page... I just have no idea how to start this program, someone can help me?

What I want is something like this:

01 - The One With Ross' New Girlfriend - <a href="http://usercash.com/go/1/20643/http://www.megaupload.com/?d=AL8BH29Q" target="_blank"><font color="blue"><b>MegaUpload 1</b></font></a> / <a href="http://usercash.com/go/1/20643/http://www.megaupload.com/?d=U7UH0IF9" target="_blank"><font color="blue"><b>MegaUpload 2</b></font></a> // <a href="http://usercash.com/go/1/20643/http://rapidshare.com/files/125976717/_Friends_2x01_Up_by_AlienwareRlz_www.playanimes.net.avi.001" target="_blank"><font color="black"><b>Rapidshare 1</b></font></a> / <a href="http://usercash.com/go/1/20643/http://rapidshare.com/files/125976659/_Friends_2x01_Up_by_AlienwareRlz_www.playanimes.net.avi.002" target="_blank"><font color="black"><b>Rapidshare 2</b></font></a><br />
02 - The One With the Breast Milk - <a href="http://usercash.com/go/1/20643/http://www.megaupload.com/?d=B5UP4U6J" target="_blank"><font color="blue"><b>MegaUpload 1</b></font></a> / <a href="http://usercash.com/go/1/20643/http://www.megaupload.com/?d=AD0B84LY" target="_blank"><font color="blue"><b>MegaUpload 2</b></font></a> // <a href="http://usercash.com/go/1/20643/http://rapidshare.com/files/125976770/_Friends_2x02_Up_by_AlienwareRlz_www.playanimes.net.avi.001" target="_blank"><font color="black"><b>Rapidshare 1</b></font></a> / <a href="http://usercash.com/go/1/20643/http://rapidshare.com/files/125976586/_Friends_2x02_Up_by_AlienwareRlz_www.playanimes.net.avi.002" target="_blank"><font color="black"><b>Rapidshare 2</b></font></a><br />
03 - The One Where Heckles Dies - <a href="http://usercash.com/go/1/20643/http://www.megaupload.com/?d=IPP85ZXV" target="_blank"><font color="blue"><b>MegaUpload 1</b></font></a> / <a href="http://usercash.com/go/1/20643/http://www.megaupload.com/?d=JX9D4B80" target="_blank"><font color="blue"><b>MegaUpload 2</b></font></a> // <a href="http://usercash.com/go/1/20643/http://rapidshare.com/files/125976752/_Friends_2x03_Up_by_AlienwareRlz_www.playanimes.net.avi.001" target="_blank"><font color="black"><b>Rapidshare 1</b></font></a> / <a href="http://usercash.com/go/1/20643/http://rapidshare.com/files/125976713/_Friends_2x03_Up_by_AlienwareRlz_www.playanimes.net.avi.002" target="_blank"><font color="black"><b>Rapidshare 2</b></font></a><br />
04 - The One With Phoebe's Husband - <a href="http://usercash.com/go/1/20643/http://www.megaupload.com/?d=7AR36UU9" target="_blank"><font color="blue"><b>MegaUpload 1</b></font></a> / <a href="http://usercash.com/go/1/20643/http://www.megaupload.com/?d=BIEQV08R" target="_blank"><font color="blue"><b>MegaUpload 2</b></font></a> // <a href="http://usercash.com/go/1/20643/http://rapidshare.com/files/125976740/_Friends_2x04_Up_by_AlienwareRlz_www.playanimes.net.avi.001" target="_blank"><font color="black"><b>Rapidshare 1</b></font></a> / <a href="http://usercash.com/go/1/20643/http://rapidshare.com/files/125976709/_Friends_2x04_Up_by_AlienwareRlz_www.playanimes.net.avi.002" target="_blank"><font color="black"><b>Rapidshare 2</b></font></a><br />
05 - The One With Five Steaks and an Eggplant - <a href="http://usercash.com/go/1/20643/http://www.megaupload.com/?d=QZPAZ5NJ" target="_blank"><font color="blue"><b>MegaUpload 1</b></font></a> / <a href="http://usercash.com/go/1/20643/http://www.megaupload.com/?d=NBMNVLD6" target="_blank"><font color="blue"><b>MegaUpload 2</b></font></a> // <a href="http://usercash.com/go/1/20643/http://rapidshare.com/files/125976979/_Friends_2x05_Up_by_AlienwareRlz_www.playanimes.net.avi.001" target="_blank"><font color="black"><b>Rapidshare 1</b></font></a> / <a href="http://usercash.com/go/1/20643/http://rapidshare.com/files/125976957/_Friends_2x05_Up_by_AlienwareRlz_www.playanimes.net.avi.002" target="_blank"><font color="black"><b>Rapidshare 2</b></font></a><br />

Copying just the http:// MegaUpload links with the after "?d=" code... and paste it on a blank notepad...

Please, any idea?

Thanks

Hey ! F.R.I.E.N.D.S episodes !

[font="Lucida Sans Unicode"]M a k. a v e L ![/font]

Link to comment
Share on other sites

Can use be more specific about after which ?d= one you want? Maybe you give a clue about which tag(s) in the source preceding it?

Edit:

#include <Array.au3>

Dim $sSource = '02 - The One With the Breast Milk - <a href="http://usercash.com' & _
               '/go/1/20643/http://www.megaupload.com/?d=B5UP4U6J" target="_blan' & _
               'k"><font color="blue"><b>MegaUpload 1</b></font></a> / <a href="' & _
               'http://usercash.com/go/1/20643/http://www.megaupload.com/?d=AD0B' & _
               '84LY" target="_blank"><font color="blue"><b>MegaUpload 2</b></fo' & _
               'nt></a> // <a href="http://usercash.com/go/1/20643/http://rapids' & _
               'hare.com/files/125976770/_Friends_2x02_Up_by_AlienwareRlz_www.pl' & _
               'ayanimes.net.avi.001" target="_blank"><font color="black"><b>Rap' & _
               'idshare 1</b></font></a> / <a href="http://usercash.com/go/1/206' & _
               '43/http://rapidshare.com/files/125976586/_Friends_2x02_Up_by_Ali' & _
               'enwareRlz_www.playanimes.net.avi.002" target="_blank"><font colo' & _
               'r="black"><b>Rapidshare 2</b></font></a><br />' & _
               '03 - The One Where Heckles Dies - <a href="http://usercash.com/g' & _
               'o/1/20643/http://www.megaupload.com/?d=IPP85ZXV" target="_blank"' & _
               '><font color="blue"><b>MegaUpload 1</b></font></a> / <a href="ht' & _
               'tp://usercash.com/go/1/20643/http://www.megaupload.com/?d=JX9D4B' & _
               '80" target="_blank"><font color="blue"><b>MegaUpload 2</b></font' & _
               '></a> // <a href="http://usercash.com/go/1/20643/http://rapidsha' & _
               're.com/files/125976752/_Friends_2x03_Up_by_AlienwareRlz_www.play' & _
               'animes.net.avi.001" target="_blank"><font color="black"><b>Rapid' & _
               'share 1</b></font></a> / <a href="http://usercash.com/go/1/20643' & _
               '/http://rapidshare.com/files/125976713/_Friends_2x03_Up_by_Alien' & _
               'wareRlz_www.playanimes.net.avi.002" target="_blank"><font color=' & _
               '"black"><b>Rapidshare 2</b></font></a><br />' & _
               '04 - The One With Phoebe''s Husband - <a href="http://usercash.c' & _
               'om/go/1/20643/http://www.megaupload.com/?d=7AR36UU9" target="_bl' & _
               'ank"><font color="blue"><b>MegaUpload 1</b></font></a> / <a hre' & _
               'f="http://usercash.com/go/1/20643/http://www.megaupload.com/?d=' & _
               'BIEQV08R" target="_blank"><font color="blue"><b>MegaUpload 2</b' & _
               '></font></a> // <a href="http://usercash.com/go/1/20643/http://' & _
               'rapidshare.com/files/125976740/_Friends_2x04_Up_by_AlienwareRlz' & _
               '_www.playanimes.net.avi.001" target="_blank"><font color="black' & _
               '"><b>Rapidshare 1</b></font></a> / <a href="http://usercash.com' & _
               '/go/1/20643/http://rapidshare.com/files/125976709/_Friends_2x04' & _
               '_Up_by_AlienwareRlz_www.playanimes.net.avi.002" target="_blank"' & _
               '><font color="black"><b>Rapidshare 2</b></font></a><br />'
               
Dim $sPattern = '(?i)(http://www.megaupload.com/[^"]+)" target'
Dim $Arr = StringRegExp($sSource, $sPattern, 3)

If IsArray($Arr) Then
    Local $hFile = FileOpen(@ScriptDir & '\' & @MDAY & '-' & @MON & '-' &  @YEAR & '.txt', 1)
    
    For $i = 0 To UBound($Arr)-1
        FileWriteLine($hFile, $Arr[$i])
    Next
    
    FileClose($hFile)
EndIfoÝ÷ Ûú®¢×y¨b·lÂäx/z¼wºØ^ØÜ·ÜÖ¥Ø^èºhiÙbKk,¨¹ìi¨§¶¬)Þr^¶jëh×6Dim $sPattern = '(?i)(http://www.megaupload.com/[^"]+)" target'

Thank you very much!

Edited by anunes
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...