пользовательский поиск Google (не пользовательский поиск Google) - PullRequest
0 голосов
/ 24 февраля 2019

Может кто-нибудь объяснить мне, как работает этот HTML?Я хочу сделать что-то, что могло бы выполнить этот поиск вместо: https://www.google.com/search?q=%25s&client=firefox-b-1-d&biw=1366&bih=614&tbm=isch&source=lnt&tbs=isz:ex,iszw:7680,iszh:4320

Я использовал Inspect Element, чтобы получить этот HTML-код от InternetTIPS.com :

<div><form action="https://www.google.com/search" method="get" name="{5C088896-C4CC-4430-A6D8-9DC9D2BE379D}" target="_top"><input maxlength="255" name="q" size="35" type="text"><input name="Overview" type="hidden" value="1"><input name="internettips" type="submit" value="Find Flash Files"><input name="as_filetype" type="hidden" value="swf"></form></div>

См.демонстрация того, что делает HTML здесь .Заранее спасибо.

1 Ответ

0 голосов
/ 04 мая 2019

Вот единственный HTML-код, который вам нужен для добавления формы поиска на страницу, которая ищет в Google изображения определенного размера:

<!-- This is a search form that will take us to
     https://www.google.com/search?tbm=isch&tbs=isz:ex,iszw:7680,iszh:4320&q=example
     when we search for ???????. This search will show us only images, and
     those images will all be 7680 pixels wide and 4320 pixels tall.

     First we enclose everything in a <????> whose ?????? is everything that
     the search engine results page’s URI to the left of the question mark (?)
     in it -->
<form action="https://www.google.com/search" method="get">

   <!-- Next, we add the arguments that are added to the Google URI. For each
        part of the URI we want to build, we need an <?????> element with a
        ????? attribute. -->

   <!-- build ???=???? -->
   <!-- ??? needs to be set to ????, which tells Google we want only
        image search results. We add ????="??????" to the input element
        because we don’t want the end user to have to choose that
        themself -->
   <input name="tbm" value="isch" type="hidden">

   <!-- build ???=???:??,????:????,????:???? -->
   <!-- ??? needs to be set to a three-part parameter that tells Google
        we’re doing a search for images of a certain size and what the
        dimensions we’re looking for are -->
   <input name="tbs" value="isz:ex,iszw:7680,iszh:4320" type="hidden">

   <!-- build ?=??????? (but ours won’t specify "example" — the user
        will decide what to search for). This parameter’s ???? is
        not ?????? but rather ????, which is what we’ll ask the user to
        enter. -->
   <!-- If we don’t want to prompt our users’ imaginations,
        we could remove ???????????="???????" -->
   <!-- ????="??" means that the field where the user will input their
        query is about 35 characters wide on page load -->
   <input name="q" size="35" type="text" placeholder="puppies">

   <!-- Finally, we add the button the user can tap to enter their query,
        so our ???? is ??????. We can set our value to whatever we want
        our button to say -->
   <input type="submit" value="Find images of size 7680px × 4320px">

 <!-- <????> is the only element we have used that we must close -->
 </form>
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...