mirror of
https://github.com/Ahwxorg/Binternet.git
synced 2024-12-06 19:27:01 +01:00
changes
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
<?php require "static/header.php"; ?>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Pinternet</h1>
|
||||
<p>It is currently not possible to use Pinternet to search Pinterest.</p>
|
||||
<div class="mainContainer">
|
||||
<h1 id="bodyHeader"><span>P</span>inter<span>n</span>et</h1>
|
||||
<p class="bodyText">Please enter the Pin ID here:</p>
|
||||
</div>
|
||||
<?php require "static/footer.php"; ?>
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
public function searchPinterest($q)
|
||||
{
|
||||
$url = "https://pinterest.com/search/pins/?q=$q";
|
||||
|
||||
$pinterestPage = file_get_contents($url);
|
||||
|
||||
$domDoc = new \DOMDocument();
|
||||
libxml_use_internal_errors(true);
|
||||
$domDoc->loadHTML($html);
|
||||
libxml_use_internal_errors(false);
|
||||
|
||||
$items = $domDoc->getElementsByTagName('script');
|
||||
$data = array();
|
||||
|
||||
foreach ($items as $item) {
|
||||
$data[] = [
|
||||
'src' => $item->getAttribute('src'),
|
||||
'outerHTML' => $domDoc->saveHTML($item),
|
||||
'innerHTML' => $domDoc->saveHTML($item->firstChild),
|
||||
];
|
||||
}
|
||||
|
||||
foreach ($data as $key => $value) {
|
||||
$response = json_decode($value['innerHTML']);
|
||||
if (!$response) {
|
||||
continue;
|
||||
}
|
||||
if (isset($response->tree->data->results)) {
|
||||
foreach ($response->tree->data->results as $obj) {
|
||||
print_r($obj->like_count);
|
||||
$images = (Array) $obj->images;
|
||||
print_r($images['736x']->url);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -5,6 +5,6 @@
|
||||
<meta charset="UTF-8"/>
|
||||
<meta name="description" content="A privacy respecting meta search engine."/>
|
||||
<meta name="referrer" content="no-referrer"/>
|
||||
<link rel="stylesheet" type="text/css" href="static/css/styles.css"/>
|
||||
<!-- <link rel="stylesheet" type="text/css" href="static/styles.css"/>-->
|
||||
<link title="LibreX search" type="application/opensearchdescription+xml" href="/opensearch.xml?method=POST" rel="search"/>
|
||||
<link rel="stylesheet" type="text/css" href="static/style-dark.css">
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
body {
|
||||
background-color: #2a2b2b;
|
||||
color: white;
|
||||
font-family:verdana, arial, sans-serif;
|
||||
}
|
||||
|
||||
span {
|
||||
color: #f218ee;
|
||||
}
|
||||
|
||||
#bodyHeader {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.bodyText {
|
||||
text-align: center;
|
||||
|
||||
}
|
||||
|
||||
.container {
|
||||
text-align: center;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
footer {
|
||||
text-align: center;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100vw;
|
||||
height: 10vh;
|
||||
color: white;
|
||||
background-color: #1f2120;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user