bash curl wget поисковая выдача яндекса и гугла
Нужна ваша помощь. Предложите её.
Мне нужна команда запроса к яндексу и гуглу, чтобы я свои строки просто заменил на ваши. Чтобы вы протестировали их на работоспособность. 1 запрос в минуту или даже в 5 минут без капчи меня устроит. Хоть с помощью php или питона. Не важно.
Мне на bash не удается запрашивать у Яндекса и Гугла поисковую страницу чаще чем 1 раз в 20 минут, чтобы с высокой долей вероятности не словить капчу. Меня это не устраивает. Я может что не так делаю?
Запускаю под root. Сервер на Linux.
Кусок моего кода, к которому есть претензии со стороны поисковых систем:
FRASE=`echo $FRASE | tr -d "\r" | tr -d "\n" | tr " " '+'` # подготавливаю фразу
md5sum=`echo $FRASE | md5sum | tr -d " " | tr -d "-"` # беру md5, чтобы в имени использовать хэш фразы
filesearching="./project/temp/google-search-0-"$md5sum".html" # имя файла
# и вот так я подготавливаю сам запрос в гуглsearching="curl -k -sA 'Chrome' -L 'https://www.google.ru/search?lr=lang_ru&hl=ru&num=100&pws=0&q="
searching+=$FRASE
searching+="&oq="
searching+=$FRASE
searching+="' -o "$filesearching
# вынес даже в отдельный файл
echo $searching > googlesearch.shchmod +x ./googlesearch.sh
./googlesearch.sh && rm googlesearch.sh
# тоже самое для яндекса с его переменными
filesearching="./project/temp/yandex-search-0-"$md5sum".html"
searching="curl -k -sA 'Chrome' -L 'https://yandex.ru/search/?numdoc=50&lr=1&text="
searching+=$FRASE
searching+="' -o "$filesearching
echo $searching > yandexsearch.sh
chmod +x ./yandexsearch.sh
./yandexsearch.sh && rm yandexsearch.sh
Может просто куки не использую? Заголовков не хватает?
Я согласен на wget и любую другую консольную программу.
Так как он меня всё время банит капчей и ждать приходится 1 час, на эксперименты я своё время потратил. Пришел к вам за помощью. Но в начале, раз 20 никакой капчи не было.
PS: к примеру, вот мой другой участок кода для скачивания сайта:
wget --mirror --content-disposition --restrict-file-names=nocontrol --level=1 --ignore-length --tries=2 -e robots=off --timeout=600 --continue --adjust-extension --convert-links -o ./log/search.log --refer=http://google.com --user-agent="Mozilla/5.0 Firefox/4.0.1" -P ./_sites_ http://avtosystems.ru
Я решил эту задачу сам с помощью скрипта curl, но на php.
В bash его вызываю так: /usr/bin/php ./get-engine.php $engine "$FRASE" > $filesearching
гугл хорошо идет. А яндекс похуже - ставлю для него бОльший sleep.
закрываю задание.
Applications 1
-
Это вам не 2008 год и даже не 2014, забейте на баш и курл, купите A-Parser и будет вам счасте (не реклама, 4 года как купил и ни разу не пожалел)
-
Current freelance projects in the category Web programming
Optimizing the website for SEOGood day! I am looking for a developer who will help with optimizing a Wordpress site. Currently, the Litespeed plugin is already installed, Redis+Opcache are enabled on the server. Here is the detailed task,… Web programming |
Website revision on Webflow.There is a task to improve the website on Webflow. The improvement consists of the fact that it is necessary to redesign the forms on the site. At the moment, the forms on the site are integrated with the Make service through which we accept data and pass it to various sources… Web programming ∙ 1 proposal |
I am looking to create an online store.
501 USD
Good morning. I am looking for someone to create an online store for me, which will operate on the principles of DROPSHIPPING. It will be connected to 2 clothing and footwear wholesalers. I am looking for someone to create such a store for me, fully automated, so that I receive… Email marketing, Web programming ∙ 6 proposals |
Setting up automatic data export to the website Promobrand.com.uaWishing you good health! I am the marketing director of the Ukrainian company Promobrand.com.ua, Oleg. I have created a website and encountered an issue with the correct automatic updating of product information. The specialist who worked on it was not able to set it up… Online stores and e-commerce, Web programming ∙ 5 proposals |
Audit and fixing of the WP website.Audit and fixing of the WP website. Need to review the WP site and indicate what can be fixed (bugs in links, images, errors in the console, contact form functionality, responsiveness, etc.) without changing the site design and make these fixes. Then transfer everything to the… Web programming ∙ 1 proposal |