Jump to content

_InetGetSource bug


Recommended Posts

I could be wrong but I seem to recall that _InetGetSource() required a fully quallified url. http://www.autoitscript.com

Just checking the help file, the parameters table doesn't show it that way but the example does.

You could also replace _InetGetSource with BinaryToString() andInetRead() which also requires the fully qualified path.

MsgBox(0, "", BinaryToString(InetRead("http://autoitscript.com")))

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

I could be wrong but I seem to recall that _InetGetSource() required a fully quallified url. http://www.autoitscript.com

Just checking the help file, the parameters table doesn't show it that way but the example does.

You could also replace _InetGetSource with BinaryToString() andInetRead() which also requires the fully qualified path.

MsgBox(0, "", BinaryToString(InetRead("http://autoitscript.com")))

IMO the $s_URL parameter is misleading as it is so it should be updated to reflect this...
Link to comment
Share on other sites

Thanks GEOSoft you were right...But whats about https sites?? Everytime I try to get the sourcecode of an https site it's empty. But if I open the site in FireFox I can get the sourcecode.

I don't recall ever using _InetGetSource() or InetRead() on an https site so I can't help you there. Perhaps someone else will come along with that answer.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

IMO the $s_URL parameter is misleading as it is so it should be updated to reflect this...

I fixed the docs and I'll submit it this morning. It seems to me there might already be a report open on this issue, but now it's done.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

I also tried it like you said...For example

MsgBox(0, "", BinaryToString(INetRead('https://addons.mozilla.org/de/firefox/addon/3829')))

It gives an empty msgbox...How do you recall those sites?

I'm just trying to get ready to go out but now that you have provided the link I'll do some testing when I return.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

I just took a quick test becuase I have another person asking about https pages as well. This worked for me

$sUrl = "https://addons.mozilla.org/de/firefox/addon/3829"

$sSource = InetRead($sUrl)
$sSource = BinaryToString($sSource)
ClipPut($sSource)

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

That's working fine here:

Local $b = INetRead('https://addons.mozilla.org/de/firefox/addon/3829')
ConsoleWrite(@error & @LF)  ; gives 0
ConsoleWrite(BinaryToString($b) & @LF)

and displays the page's source (shortened here):

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="de" dir="ltr"

class="html-ltr firefox">

<head>

<title>Live HTTP Headers :: Firefox Add-ons</title>

<link rel="shortcut icon" type="image/x-icon"

href="/img/favicon.ico" />

<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

<meta name="MSSmartTagsPreventParsing" content="true"/>

<meta name="keywords" content="add-ons,addons,erweiterungen,themes,firefox,thunderbird,sunbird,seamonkey,fennec,plugins,personalisieren,mozilla,browser"/>

<meta name="description" content="Personalisieren Sie Firefox, Thunderbird und andere Mozilla-Produkte mit tausenden von kostenlosen Erweiterungen und Themes."/>

<meta name="Copyright" content="Creative Commons Attribution Share-Alike Lizenz v3.0, außer wenn anderweitig angegeben."/>

<meta http-equiv="imagetoolbar" content="no"/>

<meta name="Rating" content="General"/>

<link rel="search" type="application/opensearchdescription+xml" title="Mozilla Add-ons"

href="/AMOSearch.xml" />

...

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to comment
Share on other sites

Very strange neither jchd's nor GEOSoft's script worked for me...

Now I'm going crazy :-D. I tried the scripts in Windows XP mode (my OS is win 7 x64) and ALL of them work in XP mode, but not in Win7...But a few days ago everything was fine..can you help me?

Link to comment
Share on other sites

Are you sure to run the latest release?

You say it doesn't work only when compiled for x64, or is it run with X64 AutoIt? Strange, but I don't have x64 handy here so I'm afraid I can't help much.

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to comment
Share on other sites

I'm sure to run the latest version. I deinstalled and installed autoit and scite again...but nothing changed. I compile the script in x86 mode, but it only works in XP-mode ... and not in Win7...You know?

Link to comment
Share on other sites

I'll try to get confirmation that it's a bug and open a ticket for this, and / or find a workaround. Please be a little patient.

A possible workaround would be to use _IE (from the IE.au3 UDF) instead and get source from there. Again I can't try on x64 myself.

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to comment
Share on other sites

Ha, a cheap proxy, of course. Reading your posts again I realize you said to have it working "by hand" in Firefox and I took this to mean it also applied to IE.

Cheers

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

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...