From Web to image control

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

huiyi_ch
Posts: 65
Joined: Sat May 21, 2016 5:27 am
Has thanked: 1 time
Been thanked: 7 times

Re: From Web to image control

Post by huiyi_ch » Sat Nov 04, 2017 3:09 am

Wonderful KDJ!

User avatar
Anand
Posts: 216
Joined: Tue May 24, 2016 4:36 pm
DBs Used: DBF
Has thanked: 37 times
Been thanked: 34 times

Post by Anand » Sat Nov 04, 2017 9:19 am

Great! Thanks KDJ.

Regards,

Anand
Image

User avatar
quartz565
Posts: 475
Joined: Mon Oct 01, 2012 12:37 pm
Location: Thessaloniki, Greece
Has thanked: 121 times
Been thanked: 12 times
Contact:

Post by quartz565 » Sat Nov 04, 2017 11:17 am

Perfect Krzysztof! Thank you very much!
Best Regards,
Nikos.

os: Windows Server 2012 - 64
hw: HP Server E5606, 2.13GHz, 8.00 GB - Intel Xeon CPU

User avatar
quartz565
Posts: 475
Joined: Mon Oct 01, 2012 12:37 pm
Location: Thessaloniki, Greece
Has thanked: 121 times
Been thanked: 12 times
Contact:

Post by quartz565 » Sat Nov 04, 2017 5:21 pm

hi Krzysztof,
Very nice work again!!

I have a problem with with some links:
While with the first link the images are saved in the table,
with the second one is not saved even though there are enough jpg images in the file (attachment).

//https://www.google.gr/search?tbm=isch&q ... 9&dpr=1.25

//https://www.google.gr/search?q=R3251161 ... 36&bih=759

Niko
webfile.zip
(234.76 KiB) Downloaded 20 times
Best Regards,
Nikos.

os: Windows Server 2012 - 64
hw: HP Server E5606, 2.13GHz, 8.00 GB - Intel Xeon CPU

KDJ
Posts: 182
Joined: Mon Sep 05, 2016 3:04 am
Location: Poland
Been thanked: 200 times

Post by KDJ » Sat Nov 04, 2017 9:11 pm

quartz565 wrote:
Sat Nov 04, 2017 5:21 pm
webfile.zip
It looks as HTML5.
What version of Internet Explorer is in your system?

User avatar
quartz565
Posts: 475
Joined: Mon Oct 01, 2012 12:37 pm
Location: Thessaloniki, Greece
Has thanked: 121 times
Been thanked: 12 times
Contact:

Post by quartz565 » Sat Nov 04, 2017 11:13 pm

Internet Explorer 11
Best Regards,
Nikos.

os: Windows Server 2012 - 64
hw: HP Server E5606, 2.13GHz, 8.00 GB - Intel Xeon CPU

User avatar
quartz565
Posts: 475
Joined: Mon Oct 01, 2012 12:37 pm
Location: Thessaloniki, Greece
Has thanked: 121 times
Been thanked: 12 times
Contact:

Post by quartz565 » Sun Nov 05, 2017 12:11 pm

In this file (“webfile.txt”) which contains link of images, we have to find and put on a ARRAY all (or the first 20) the strings (links) that start with "HTTS://" and ends with “.JPG” or with “.PNG”
eg : htts://tsdsddk:dddsadas123456.jpg
htts://thisto123456.jpg
htts://thisanadto123456.png
….
I saw the relative Mol’s function “GetLinkFiles”
but I will need some help how to make this....

Niko
Best Regards,
Nikos.

os: Windows Server 2012 - 64
hw: HP Server E5606, 2.13GHz, 8.00 GB - Intel Xeon CPU

KDJ
Posts: 182
Joined: Mon Sep 05, 2016 3:04 am
Location: Poland
Been thanked: 200 times

Post by KDJ » Sun Nov 05, 2017 12:18 pm

Niko

Try this version.
I added detection of image in attribute "data-src" inside "img" tags.

ImageFromWeb.zip
(4.4 KiB) Downloaded 28 times

User avatar
quartz565
Posts: 475
Joined: Mon Oct 01, 2012 12:37 pm
Location: Thessaloniki, Greece
Has thanked: 121 times
Been thanked: 12 times
Contact:

Post by quartz565 » Sun Nov 05, 2017 2:37 pm

Krzysztof,
now it works !!
the first 15-20 images are important in the result, but the program
starts after the first 20. Why does this happen?

(in this link : https://www.google.gr/search?q=R3251161 ... 36&bih=759)

Niko
Best Regards,
Nikos.

os: Windows Server 2012 - 64
hw: HP Server E5606, 2.13GHz, 8.00 GB - Intel Xeon CPU

KDJ
Posts: 182
Joined: Mon Sep 05, 2016 3:04 am
Location: Poland
Been thanked: 200 times

Post by KDJ » Mon Nov 06, 2017 7:24 pm

Niko

In your internet browser probably (rather surely) is enabled handling of JavaScript.
If you disable JavaScript, you will see the same images in the browser and in my program.

--------
New version of ImageFromWeb:
- now in URL field you can type internet address or path to local html file.

ImageFromWeb.zip
(4.46 KiB) Downloaded 41 times

Post Reply