Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
View Page Source
#1
GetHtml doesn't show the same code as you get with 'View Page Source', especially with scripts. Is there any way to get all the code, please?
#2
HtmlDoc recreates parsed HTML.
IntGetFile downloads exact HTML. If need HTML of page in web browser, you can get its current URL and download source with IntGetFile. I don't know how to get exact source HTML from Internet Explorer.
#3
Thanks for your help.

When I use 'View Page Source' I am logged with my username and password and it shows all the code. If I use HtmlDoc or IntGetFile, I cannot pass my user/pass (or cookies with that info) therefore the html code is for the non-logged in users page. Any alternative as Http c.Connect(url "username" "password") or something like that?
#4
If currently logged-in in Internet Explorer, QM Internet functions can use IE cookies and get HTML for the logged-in user.
IE in protected mode runs with Low integrity level and stores cookies in different location. To use that cookies in QM, let the macro run in separate process with Low integrity level.

Macro Macro2088
Code:
Copy      Help
;/exe 4
IntGetFile ...

Or can log-in in QM, using dialog with web browser control.
Function IntLoginDialog
Code:
Copy      Help
;/Dialog_Editor
function! $loginURL

;Shows dialog with specified web page.
;Returns: 1 OK, 0 Cancel.
;Use to log in to a website if need when using QM internet functions.
;Actually you can use this function to display any web page, for example to log out.

;EXAMPLE
;for _i 0 2
,;IntGetFile "http://www.quickmacros.com/forum/index.php" _s
,;if(findw(_s "Logout")>=0) break ;;find something that exists only when logged-in
,;if(_i or !IntLoginDialog("http://www.quickmacros.com/forum/ucp.php?mode=login")) end "failed to log in"
;out _s


str dd=
F
;BEGIN DIALOG
;0 "" 0x90CF0AC8 0x0 0 0 521 357 "QM - Login - {loginURL}"
;3 ActiveX 0x54030000 0x0 0 0 522 332 "SHDocVw.WebBrowser"
;1 Button 0x54030001 0x0 204 340 48 14 "OK"
;2 Button 0x54030000 0x0 256 340 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x203050A "*" "" "" ""

str controls = "3"
str ax3SHD
ax3SHD=loginURL
if(!ShowDialog(dd 0 &controls)) ret
ret 1
#5
Works fine, thanks!

IE+
;/exe 4
IntGetFile ...

... was my option. Any chance to rewrite the QM Internet functions for my beloved Firefox (and more secure xD)?
#6
QM already has functions for Firefox. Can get URL, title, HTML, text, HTML element attributes, open web page and wait until loaded, get tabs, select tab. Some functions are in the Acc class. Some functions are in the forum only.
#7
Oh yes, I do know some of them.

But IntGetFile/GetHtml don't work for Firefox even logged-in:

IntGetFile "http://www.wwwwww.com" _s

HtmlDoc d
str url="http://www.wwwwww.com"
d.SetOptions(2)
d.InitFromWeb(url)

_s=d.GetHtml
#8
If you can find where Firefox saves cookies, and get cookies of the website that you need, it's possible to use them in QM. Need some corrections in Http.Get to send custom headers.


Forum Jump:


Users browsing this thread: 1 Guest(s)