-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbook24.php
More file actions
53 lines (35 loc) · 1.07 KB
/
book24.php
File metadata and controls
53 lines (35 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
$xhe_host ="127.0.0.1:7012";
// The following code is required to properly run XWeb Human Emulator
require("C:\XWeb\Human Emulator Free\Templates\xweb_human_emulator.php");
$keys = file("C:\\2.txt");
$file = "C:\\1.html";
for($ii=0;$ii<count($keys);$ii++)
{
// ïîëó÷èòü çàïðîñ
$ks = trim($keys[$ii]);
// ïåðåéòè
$browser->navigate("https://book24.ru/search/?q=".$ks);
$p = $element->click_by_inner_html("
Ê ñîæàëåíèþ, ï",false);
if ($p == 1) {
$browser->navigate("https://book24.ru/search/?q=".$ks);
}
else{
$s="<p>".$ks." ".$image->get_src_by_number(1)."</p>";
$debug->optimize_memory()."<br>";
$image->screenshot_by_number("C:\\foto\\".$ks.".jpeg",1);
$debug->optimize_memory()."<br>";
$image->click_by_number(1);
$t="<p>".$ks." ".$h1->get_inner_text_by_number(0)."</p>";
$textfile->add_string_to_file($file,$t)."<br>";
$debug->optimize_memory()."<br>";
$textfile->add_string_to_file($file,$s)."<br>";
$debug->optimize_memory()."<br>";
}
}
// ïîêàçàòü
$app->shell_execute("",$file);
// Quit
$app->quit();
?>