Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Finding an easter-egg in Internet with Visual Foxpro 2

Status
Not open for further replies.

german12

Programmer
Nov 12, 2001
563
DE
If I want to search for a term in Google - it's easy:
I call google and write "easter egg".
Then I get this address as an example:

and as you can see, the search term is also visible there.
(easter + egg).

Of course - I can find GOOGLE with Hyperlink1.navigateto(but thats not deep enough...

Two questions:

I don't know now whether this address could be found from VFP,
if you only had "Easter eggs" as input - or - a little more clearly:

a) Could you start with a term from VFP (in this example "Easter egg")
in order to get the above mentioned GOOGLE page which includes your term?

b) Could VFP then read and save this link?

Maybe a stupid question - but my father once said:
"There are no stupid questions, only stupid answers"
I hope my question is not a rotten egg

Happy Easter to all of you
Keep healthy


Klaus

Peace worldwide - it starts here...
 
BTW, the Start menu does not list IE on my Win10 machine either. But if I type IE in the search box, it can be accessed. Don't know why.

Steve
 
Steve: I tried what you wrote - but does't help here.

Peace worldwide - it starts here...
 
Concerning MS EDGE Microsoft's argument is "more safety,modern outfit" . Therefore there is no further support...(for the Internet-Explorer)

Peace worldwide - it starts here...
 
Steve
I have also looked very long - but now I know where the Internet-Explorer can be seen: (I use Windows 10 Version 20H2)

Do this:
go to Apps and Features in Windows Menu - and when you are there click on "Optional Features" - and there you can see the Internet Explorer

Klaus.

I found it via this article


Peace worldwide - it starts here...
 
This was the reason, that I did not find the IE on my PC:

How do I activate Internet Explorer?
Select Start> Search and enter Windows Features.
Select Turn Windows features on or off from the results and make sure the box next to Internet Explorer 11 is checked.
(it was not checked here although I had meanwhile installed it here via a MS info.

Select OK and restart your device.

Peace worldwide - it starts here...
 
Chriss - I tested your code - and it works great.
the code-line

Code:
loImages = loBody.getElementsByTagName('img')

of course returns all sorts of pictures/graphic,

But that is not a problem - i stored them all in a cursor and then I could easily filter them out
(e.g. delete all for .not. "png"$founditem)
and had meaningful pictures with it.

And - you must not open Internet-Explorer - it works in background - and my Firefox presents that pics also very well.

Chriss & Mike - You helped me very well.

Thank you both very much.
Klaus



Peace worldwide - it starts here...
 
How to filter surely depends on the page. You can also determine relevant pictures by size, or look into a detail part of the page, not the whole body, but for example, a DIV.

Chriss
 
Chriss
To my shame I have to confess, that I am not familiar with HTML but I still want to learn it.
That why I don't know how to code the size in order to restrict the pictures to a certain size.
Can you tell me, what to do get deeper into matter access to the URL body etc.?
How did you get this good knowledge?

Perhaps you know a link in Internet, or can recommend a good book?

Thank you in advance.

Klaus

Chriss said:
....but for example, a DIV.

what is a Div? (Division? divers....?)

Peace worldwide - it starts here...
 
To your last question: A DIV is an HTML tag or element, one that is like a container. Webpages are often organized in divs as sections, for example a navigation/menu div and a div for a galery. All icons for navigations are unimportant to you.

There are many good resources to learn HTML. as a german resource, is quite good as a reference, also offers some introduction tutorials here:
Chriss
 
Hi Chriss,
that really is a good source - and for me of course, it is easier to understand, because it is my mother tongue.
And it's also free. There is no more good advice.

I tried now this investigation:

A few months agou I bought this program "1 a Bildsauger" (english: "sucking a picture") for 15 €

Link

They also deliver a trial version free of charge ,however that trial-version can only load small images.
In the purchased program you can determine the max/min image size yourself.
It is worth the price.



But I got to know a boundary, when I tried to load pictures with that program, when I used this link:

[link ]Link[/url]

For that reason I wrote a mail to the author/developer and got this answer from him:

" The 1 A picture sucker doesn't always manage to download pictures.
As an example this link


Some websites are actually not "vacuumable", which is due to the fact that no "regular" links are used, but the images are loaded via JavaScript (which can also be seen, for example, from the source code of your sample page.)
JavaScript requires a "real person" to click on links, so to speak, so that a program unfortunately gets stuck"



Chriss:
At that time I did not know about your approach.
Now of course I had your program tried with this URL - and BINGO it even works here too.
Under this link

Link

(contains 16 pics)
your program found anyway 6 of them as *.jpg - I don't know where/what the other 10 pics shown there are).

I think it is very interesting, I hope also for you.

Thank you very much.
Klaus

Always this creates a new question:
Your program can find the detailed URLs within a website and can show the URL for each picture.
Question:
Would it also be possible to download the pictures shown by using VFP?


Peace worldwide - it starts here...
 
That's no surprise to me.

First, Waiting for ReadyState=4 you wait for a webpage to completely load, which includes "bootstrap" javasript code loading images tc.
Also, the code does not parse the HTML, it works on the so-called DOM (document object model), which in short means it looks at the objects in the browser, not the source code.

Chriss
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top