ConsultingJoe 1 Posted December 21, 2006 (edited) the link is "http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid=9048423" and I wan to get the 9048423 out of it but its in the entire source, any ideas? Thanks Edit: I dono what flags to use or the pattern Edited December 21, 2006 by CyberZeroCool [center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center] Share this post Link to post Share on other sites
Thatsgreat2345 0 Posted December 21, 2006 (edited) smoke_ns udf just grabbed the ending, and then just got every possible character popped it in an with a bunch of Ors(|) and then yeah ahhaha easy way for me #include <array.au3> $sURL = "http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid=23423423423423423423" Dim $szProtocol, $szDomain, $szPath, $szFile $TestPath = _URLSplit($sURL, $szProtocol, $szDomain, $szPath, $szFile) $reg = StringRegExp($TestPath[4],"(\w|\.|\?|\&|\d)+\=(\d+)$",1) _ArrayDisplay($reg, 'Demo _UrlSplit()') Func _URLSplit($szUrl, ByRef $szProtocol, ByRef $szDomain, ByRef $szPath, ByRef $szFile) Local $sSREPattern = '^(?s)(?i)(http|ftp|https|file)://(.*?/|.*$)(.*/){0,}(.*)$' Local $aUrlSRE = StringRegExp($szUrl, $sSREPattern, 2) If Not IsArray($aUrlSRE) Or UBound($aUrlSRE) - 1 <> 4 Then Return SetError(1, 0, 0) If StringRight($aUrlSRE[2], 1) = '/' Then $aUrlSRE[2] = StringTrimRight($aUrlSRE[2], 1) $aUrlSRE[3] = '/' & $aUrlSRE[3] EndIf $szProtocol = $aUrlSRE[1] $szDomain = $aUrlSRE[2] $szPath = $aUrlSRE[3] $szFile = $aUrlSRE[4] Return $aUrlSRE EndFunc ;==>_URLSplit Edited December 21, 2006 by Thatsgreat2345 Share this post Link to post Share on other sites
ConsultingJoe 1 Posted December 21, 2006 smoke_ns udf just grabbed the ending, and then just got every possible character popped it in an with a bunch of Ors(|) and then yeah ahhaha easy way for me #include <array.au3> $sURL = "http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid=23423423423423423423" Dim $szProtocol, $szDomain, $szPath, $szFile $TestPath = _URLSplit($sURL, $szProtocol, $szDomain, $szPath, $szFile) $reg = StringRegExp($TestPath[4],"(\w|\.|\?|\&|\d)+\=(\d+)$",1) _ArrayDisplay($reg, 'Demo _UrlSplit()') Func _URLSplit($szUrl, ByRef $szProtocol, ByRef $szDomain, ByRef $szPath, ByRef $szFile) Local $sSREPattern = '^(?s)(?i)(http|ftp|https|file)://(.*?/|.*$)(.*/){0,}(.*)$' Local $aUrlSRE = StringRegExp($szUrl, $sSREPattern, 2) If Not IsArray($aUrlSRE) Or UBound($aUrlSRE) - 1 <> 4 Then Return SetError(1, 0, 0) If StringRight($aUrlSRE[2], 1) = '/' Then $aUrlSRE[2] = StringTrimRight($aUrlSRE[2], 1) $aUrlSRE[3] = '/' & $aUrlSRE[3] EndIf $szProtocol = $aUrlSRE[1] $szDomain = $aUrlSRE[2] $szPath = $aUrlSRE[3] $szFile = $aUrlSRE[4] Return $aUrlSRE EndFunc ;==>_URLSplitThanks but will this work for multiple ids in the source? [center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center] Share this post Link to post Share on other sites
Thatsgreat2345 0 Posted December 21, 2006 (edited) are you going to make the entire string reg exp sample the source? woops i cant read xD hold on Edited December 21, 2006 by Thatsgreat2345 Share this post Link to post Share on other sites
ConsultingJoe 1 Posted December 21, 2006 are you going to make the entire string reg exp sample the source?woops i cant read xD hold onyeah so the string would be:<div class="clear"> </div> <div class="left w100"> <a href="http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid=94243940&MyToken=256da639-f26d-4ac0-933d-be20fa5859e8" id="ctl00_Main_ctl00_FriendSpace1_FriendRepeater_ctl08_friendLink">Dave King</a><br> <a href="http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid=94243940&MyToken=256da639-f26d-4ac0-933d-be20fa5859e8" id="ctl00_Main_ctl00_FriendSpace1_FriendRepeater_ctl08_friendImageLink"><img src="http://x.myspace.com/images/no_pic.gif" alt=""></a><br> <div id="UserDataNode8" class="DataPoint=OnlineNow;UserID=94243940;" align="center"><img src="http://i.myspace.com/site/images/clear.gif" border="0" height="20" width="80"></div> </div> <div class="left w100"> <a href="http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid=7892788&MyToken=256da639-f26d-4ac0-933d-be20fa5859e8" id="ctl00_Main_ctl00_FriendSpace1_FriendRepeater_ctl09_friendLink">Tiffany</a><br> <a href="http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid=7892788&MyToken=256da639-f26d-4ac0-933d-be20fa5859e8" id="ctl00_Main_ctl00_FriendSpace1_FriendRepeater_ctl09_friendImageLink"><img src="http://myspace-613.vo.llnwd.net/01474/31/60/1474470613_s.jpg" alt=""></a><br> <div id="UserDataNode9" class="DataPoint=OnlineNow;UserID=7892788;" align="center"><img src="http://i.myspace.com/site/images/clear.gif" border="0" height="20" width="80"></div> </div> <div class="left w100"> <a href="http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid=80822949&MyToken=256da639-f26d-4ac0-933d-be20fa5859e8" id="ctl00_Main_ctl00_FriendSpace1_FriendRepeater_ctl10_friendLink">HopeIsEmo.com</a><br> <a href="http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid=80822949&MyToken=256da639-f26d-4ac0-933d-be20fa5859e8" id="ctl00_Main_ctl00_FriendSpace1_FriendRepeater_ctl10_friendImageLink"><img src="http://myspace-293.vo.llnwd.net/00824/39/25/824875293_s.jpg" alt=""></a><br> <div id="UserDataNode10" class="DataPoint=OnlineNow;UserID=80822949;" align="center"><img src="http://i.myspace.com/site/images/clear.gif" border="0" height="20" width="80"></div> </div> <div class="left w100"> <a href="http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid=57788321&MyToken=256da639-f26d-4ac0-933d-be20fa5859e8" id="ctl00_Main_ctl00_FriendSpace1_FriendRepeater_ctl11_friendLink">posh suicide</a><br> <a href="http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid=57788321&MyToken=256da639-f26d-4ac0-933d-be20fa5859e8" id="ctl00_Main_ctl00_FriendSpace1_FriendRepeater_ctl11_friendImageLink">and I need to get just the id numbers like:80822949577883217892788 [center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center] Share this post Link to post Share on other sites
Thatsgreat2345 0 Posted December 21, 2006 Your going to have to find a way to remove doubles #include <array.au3> #include <Inet.au3> Global $counter, $Numbers[42] $sURL = _INetGetSource("http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid=9048423") $reg = StringRegExp($sURL,"&friendid=(\d+)",3) _ArrayDisplay($reg,'') Share this post Link to post Share on other sites
theguy0000 2 Posted December 21, 2006 Your going to have to find a way to remove doubles #include <array.au3> #include <Inet.au3> Global $counter, $Numbers[42] $sURL = _INetGetSource("http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid=9048423") $reg = StringRegExp($sURL,"&friendid=(\d+)",3) _ArrayDisplay($reg,'')just for a bit of foolproof might wanna change &friendid=(\d+) to [&?]friendid=(\d+) The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN Share this post Link to post Share on other sites
ConsultingJoe 1 Posted December 21, 2006 just for a bit of foolproof might wanna change &friendid=(\d+) to [&?]friendid=(\d+)Thanks, it worked but is there a faster way? [center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center] Share this post Link to post Share on other sites
theguy0000 2 Posted December 21, 2006 Thanks, it worked but is there a faster way?probably not. that's one BIG web page there. The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN Share this post Link to post Share on other sites
SmOke_N 210 Posted December 22, 2006 This may be too simple, but this wouldn't work? #include <array.au3> #include <string.au3> $sString = FileRead('Whatever or use InetGetSource') $aArray = _StringBetween($sString, 'friendid\=', '\&', -1, 1) _ArrayDisplay($aArray, '')(#include <array.au3> and _ArrayDisplay() only used for showing the result) Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Share this post Link to post Share on other sites
ConsultingJoe 1 Posted December 22, 2006 this did work but it just took too long Global $counter, $Numbers[42] $sURL = _INetGetSource("http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid=9048423") $reg = StringRegExp($sURL,"[&?]friendid=(\d+)",3) _ArrayDisplay($reg,'') [center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center] Share this post Link to post Share on other sites
Thatsgreat2345 0 Posted December 22, 2006 as i said you must figure out a way to find duplicates haha which i found out to be quite difficult , which just gave me an idea , u first take the first string say in a file, do a stringinstr, and then get the length and trim nevermind hahah ive yet to figure a way to get rid of duplicates Share this post Link to post Share on other sites
ConsultingJoe 1 Posted December 22, 2006 as i said you must figure out a way to find duplicates haha which i found out to be quite difficult , which just gave me an idea , u first take the first string say in a file, do a stringinstr, and then get the length and trim nevermind hahah ive yet to figure a way to get rid of duplicatesLOL its cool. I just wanted to make some Myspace UDFs, friend finder, and messangers [center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center] Share this post Link to post Share on other sites