Jump to content
Sign in to follow this  
FlyInSky

how can i get right Collection from no English site?

Recommended Posts

FlyInSky

I wrote a script used to check whether the updated website, if updated on the website to check whether there are any new link. Why I got the link address is gibberish? What can i do?

For example´╝Ü

#include <IE.au3>
$oIE = _IECreate ("lib.verycd.com/2007/05/04/0000148697.html", 1, 1, 0)
_IELoadWait ($oIE)
$oLinks = _IELinkGetCollection ($oIE)
$iNumLinks = @extended
MsgBox(0, "Link Info", $iNumLinks & " links found",1)
For $oLink In $oLinks
    If StringLeft($oLink.href,StringLen("ed2k"))="ed2k" Then
        MsgBox(0, "Link Info", $oLink.href,1)
    EndIf   
Next

Share this post


Link to post
Share on other sites
DaleHohm

What gibberish? I get exactly what appears in the page source for those links:

Link Info: ed2k://|file|%E5%A5%8B%E6%96%9701.rmvb|163999418|cef40e1def2229fb97799faeca2aaa30|h=ZLWEWYZ4VLGPJJDB5FRACZQHVSXPDZDU|/
Link Info: ed2k://|file|%E5%A5%8B%E6%96%9702.rmvb|164296824|9594c0d622b40c61b8b2a59dc5de34d7|h=JLTJCKTV3OMZCVITECQJSDNVI7QXFG22|/
Link Info: ed2k://|file|%E5%A5%8B%E6%96%9703.rmvb|164511991|935e004bce0ea73188b3eb6478b99794|h=V2W5KJRCH435UCRVW5EOMCBQTNSRA3IK|/
Link Info: ed2k://|file|%E5%A5%8B%E6%96%9704.rmvb|168657435|313041db3430c30ca184ddf9e970003c|h=NQHQNBA4J5YKKY6HJCK37DDQFM4JN2R3|/
Link Info: ed2k://|file|%E5%A5%8B%E6%96%9705.rmvb|166591245|54031958d34c65763447c10220c18a2d|h=3YBEQUBAQCWQ664LSAIWVS3QYMIXMARA|/
Link Info: ed2k://|file|%E5%A5%8B%E6%96%9706.rmvb|172953048|f28ca6e62a8e614eda2cf054c7080e48|h=MEB4KKWACLFKNNX6CT6BGP35GK6EKQBE|/
Link Info: ed2k://|file|%E5%A5%8B%E6%96%9707.rmvb|164100205|4824fb70cf1345ae6becb35e36ee4847|h=G5XHE2LY6BJXW7ITNLTRDMBKWOUALCZN|/
Link Info: ed2k://|file|%E5%A5%8B%E6%96%9708.rmvb|165818251|72e44ac8108eb4f1085a6dc6b9338115|h=4ITFUQMWJIFUFQTIBPKZYVPSAQCY3HMU|/
Link Info: ed2k://|file|%E5%A5%8B%E6%96%9709.rmvb|218399054|2972438bd450feb4541879deaf0756a4|h=ZHUUOGBULK47PTST6QQLDDEXGXNLIBQT|/
Link Info: ed2k://|file|%E5%A5%8B%E6%96%9710.rmvb|202695926|dcbacd4f091fd80ff2fa9e59210f3e4c|h=WLKMCTH6INMCIQSVTSXAQ77X3V3AFUYI|/

Dale


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites
FlyInSky

My got

post-16343-1179173696_thumb.jpg

Ps:My OS is the Chinese

Edited by FlyInSky

Share this post


Link to post
Share on other sites
FlyInSky

Who can i help me? :)

Share this post


Link to post
Share on other sites
PsaltyDS

I suspect the text is all UTF-16. Most AutoIt functions do ANSI - hence the "gibberish".

:D

Edit: There has been substantial change in this for AutoIt. Check out the AutoIt version history:

13th May, 2007 - v3.2.4.1

* Added: ChrW() and AscW() for unicode operations.

* Fixed: Chr() and Asc() for character codes 128-255 in unicode mode.

* Fixed: Unicode BOM was not being written in file append modes if the file was empty.

* Fixed: Error in Include\GuiCombo.au3 and Include\IE.au3.

10th May, 2007 - v3.2.4.0

Big changes:

* AutoIt is now compiled for Unicode! AutoIt3.exe is Unicode - AutoIt3A.exe is ANSI. For more details see this page.

* Au3Info tool rewritten.

* Binary data functions completely rewritten - scripts using these functions will need to be changed.

Very cool, Jon!

:)

Edited by PsaltyDS

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
DaleHohm

What version of AutoIt are you using? I got the output above from 3.2.4.1

Dale


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
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
Sign in to follow this  

×