-
Dec 6th, 2014, 11:05 AM
#1
Thread Starter
Addicted Member
Download A "Cloaked" Web Page...
VB6
Win7
I have the code to download a web page, but if you were to use a URL such as "https://www.facebook.com/groups/RealFunnyStuff/", it is not the entire page. The file size ends up being around 2KB, enclosed with a redirect to the actual page.
The code I am using is this:
Code:
Private Declare Function URLDownloadToFile Lib "urlmon" Alias _
"URLDownloadToFileA" (ByVal pCaller As Long, _
ByVal szURL As String, _
ByVal szFileName As String, _
ByVal dwReserved As Long, _
ByVal lpfnCB As Long) As Long
Public Function DownloadFile(URL As String, _
LocalFilename As String) As Boolean
Dim lngRetVal As Long
lngRetVal = URLDownloadToFile(0, URL, LocalFilename, 0, 0)
If lngRetVal = 0 Then DownloadFile = True
End Function
Calling like this:
Code:
DownloadFile "https://www.facebook.com/groups/RealFunnyStuff/", "C:\Lab\test.htm")
(and no, it doesn't matter whether I have http, https, or www for the url beginning)
I would like to download the entire page. How can I do this?
-
Dec 6th, 2014, 11:27 AM
#2
Re: Download A "Cloaked" Web Page...
Well if it is using a redirect at some point then it is actually more than one page
-
Dec 6th, 2014, 02:16 PM
#3
Thread Starter
Addicted Member
Re: Download A "Cloaked" Web Page...
There is a link inside the file that, if copied and pasted into a browser, will pull up the same thing. The link is slightly different than the original. However, when using the new link to download the page, I get the same thing.
-
Dec 7th, 2014, 10:11 AM
#4
Thread Starter
Addicted Member
Re: Download A "Cloaked" Web Page...
-
Dec 8th, 2014, 08:41 AM
#5
Re: Download A "Cloaked" Web Page...
Originally Posted by Conroy Vanderbluff
There is a link inside the file that, if copied and pasted into a browser, will pull up the same thing. The link is slightly different than the original. However, when using the new link to download the page, I get the same thing.
When you say "Entire web page" do you mean you want to save as "Web Page, Complete"? That is save the text and images, etc on the page not just the text.
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
-
Dec 8th, 2014, 11:15 PM
#6
Hyperactive Member
Re: Download A "Cloaked" Web Page...
I think I might have run into the same problem when using Inet. It turns out there are two versions of Inet.
one is around 112k
the other 130k
When I used 112k version of inet, for some sites, I was only able to download a small portion of the HTML, incomplete.
But the second version didn't have this problem.
I haven't practiced downloading pages using API. But perhaps you can use something else.
Sorry for being a newbie here not much help
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|