web переменные и их обновления.Нужна помощь.

Использование системы в различных ситуациях, вопросы программирования сценариев.

Модератор: immortal

gagarin74
Сообщения: 330
Зарегистрирован: Пн апр 06, 2015 9:51 am
Благодарил (а): 37 раз
Поблагодарили: 22 раза

web переменные и их обновления.Нужна помощь.

Сообщение gagarin74 » Вс авг 16, 2015 5:26 pm

Начал замечать очень не приятную вещь.Настроил переменную что бы она получала температуру на яндаксе.Все работает.Но вот в течении дня на сайте яндекса,переменная меняется,а в умном доме нет.
Что делал-перегружал.Удалял историю переменной.Прописывал новую переменную.При прописывании новой переменной,хватается с сайта один раз ,а дальше "залипает". Хоть при ручном обновлении,хоть по таймеру.Хотя на сайте уже висит другое значение.Такое впечатление что где то в кеше хорониться значение -оно то и вписывается. Подобный бред наблюдал когда отваливается датчик температуры.Как было на нем 23 градуса,так оно в базу и пишется постоянно. Как с этим бороться ?
olehs
Сообщения: 1115
Зарегистрирован: Вс июн 14, 2015 11:08 am
Благодарил (а): 85 раз
Поблагодарили: 342 раза

Re: web переменные и их обновления.Нужна помощь.

Сообщение olehs » Вс авг 16, 2015 9:16 pm

А адрес и шаблон покажете?
gagarin74
Сообщения: 330
Зарегистрирован: Пн апр 06, 2015 9:51 am
Благодарил (а): 37 раз
Поблагодарили: 22 раза

Re: web переменные и их обновления.Нужна помощь.

Сообщение gagarin74 » Вс авг 16, 2015 9:20 pm

адрес https://pogoda.yandex.ru/zhukovskiy/
шаблон div class="current-weather__thermometer current-weather__thermometer_type_now">(.+?) °C
gagarin74
Сообщения: 330
Зарегистрирован: Пн апр 06, 2015 9:51 am
Благодарил (а): 37 раз
Поблагодарили: 22 раза

Re: web переменные и их обновления.Нужна помощь.

Сообщение gagarin74 » Вс авг 16, 2015 9:22 pm

и соответственно второй шаблон на эту же страницу
Вчера в это время: (.+?)<\/div><

то обновляется,то может целый день "тянуть " старые данные(утренние дублировать)

в данный момент система (умный дом) тянет переменную равную +16 хотя в реале на веб отображено +15
в сполере именно та сохраненная страница откуда тенет.
СпойлерПоказать
<!DOCTYPE html><html class="i-ua_js_no i-ua_css_standard" lang="ru"><head><meta charset="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Прогноз погоды в Жуковском на 10 дней — Яндекс.Погода</title><script>;(function(d,e,c,r){e=d.documentElement;c="className";r="replace";e[c]=e[c][r]("i-ua_js_no","i-ua_js_yes");if(d.compatMode!="CSS1Compat")e[c]=e[c][r]("i-ua_css_standart","i-ua_css_quirks")})(document);;(function(d,e,c,n,w,v,f){e=d.documentElement;c="className";n="createElementNS";f="firstChild";w="http://www.w3.org/2000/svg";e[c]+=" i-ua_svg_"+(!!d[n]&&!!d[n](w,"svg").createSVGRect?"yes":"no");v=d.createElement("div");v.innerHTML="<svg/>";e[c]+=" i-ua_inlinesvg_"+((v[f]&&v[f].namespaceURI)==w?"yes":"no");})(document);;(function(d,e,p){e=d.documentElement;p="placeholder";e.className+=" i-ua_"+p+(p in d.createElement("input")?"_yes":"_no")})(document);</script><!--[if gt IE 9]><!--><link rel="stylesheet" href="//yastatic.net/weather-frontend/3.9.0/desktop.bundles/index/_index.css"/><!--<![endif]--><!--[if IE 6]><link rel="stylesheet" href="//yastatic.net/weather-frontend/3.9.0/desktop.bundles/index/_index.ie6.css"/><![endif]--><!--[if IE 7]><link rel="stylesheet" href="//yastatic.net/weather-frontend/3.9.0/desktop.bundles/index/_index.ie7.css"/><![endif]--><!--[if IE 8]><link rel="stylesheet" href="//yastatic.net/weather-frontend/3.9.0/desktop.bundles/index/_index.ie8.css"/><![endif]--><!--[if IE 9]><link rel="stylesheet" href="//yastatic.net/weather-frontend/3.9.0/desktop.bundles/index/_index.ie9.css"/><![endif]--><link rel="stylesheet" href="//yastatic.net/weather-frontend/3.9.0/i/print/print.css" media="print"/><meta name="viewport" content="width=1000"/><meta name="description" content="Подробный прогноз погоды для Жуковского и тысяч городов по всему миру на ближайшие 10 дней. Температура воздуха и воды, осадки, давление и влажность, скорость ветра. Погодные карты, информер для сайта и информация о климате регионов. "/><meta property="og:title" content="Прогноз погоды в Жуковском на 10 дней — Яндекс.Погода"/><meta property="og:description" content="Подробный прогноз погоды для Жуковского и тысяч городов по всему миру на ближайшие 10 дней. Температура воздуха и воды, осадки, давление и влажность, скорость ветра. Погодные карты, информер для сайта и информация о климате регионов. "/><meta property="og:image" content="/og_image.png"/><meta property="og:type" content="website"/><meta property="og:site_name" content="Яндекс.Погода"/><link rel="shortcut icon" href="/favicon.ico"/><meta name="msapplication-TileImage" content="/tile-square-transp.png"/><meta name="msapplication-TileColor" content="#ee0000"/><meta name="application-name" content="Яндекс.Погода"/><meta name="msapplication-square70x70logo" content="/tile-tiny-transp.png"/><meta name="msapplication-square150x150logo" content="/tile-square-transp.png"/><meta name="msapplication-wide310x150logo" content="/tile-wide-transp.png"/><meta name="msapplication-square310x310logo" content="/tile-large-transp.png"/><link rel="search" type="application/opensearchdescription+xml" title="Яндекс.Погода" href="/opensearch.ru.xml"/><link rel="canonical" href="//pogoda.yandex.ru/zhukovskiy"/></head><body class="b-page b-page_type_index inquire geo-stat b-page__body i-ua i-ua_interaction_yes i-global i-bem" data-bem="{"b-page":{},"inquire":{"inquire":{"top":".content__top a","btm":".info__ratatuy a"},"level":2,"maxLevel":3},"geo-stat":{},"i-ua":{},"i-global":{"lang":"ru","tld":"ru","content-region":"ru","click-host":"//clck.yandex.ru","passport-host":"https://passport.yandex.ru","pass-host":"https://pass.yandex.ru","social-host":"https://social.yandex.ru","export-host":"https://export.yandex.ru","login":"gagarin74","lego-static-host":"//yastatic.net/lego/2.10-142","id":"weather","host":"https://pogoda.yandex.ru","user-region":"ru","secret-key":"u5ec62d0b4e32d2c6848022c88a4e434d","retpath":"https://pogoda.yandex.ru/zhukovskiy/","social-retpath":"https://pogoda.yandex.ru/social-broker__closer.html","uid":"8406994","yu":"8334848161413980465","rid":20571,"urid":20571,"slug":"zhukovskiy","metrikaId":115080}}"><div class="header2 i-bem" role="banner" data-bem="{"header2":{"live":false}}"><div class="header2__main"><div class="header2__logo"><a class="link i-bem" tabindex="-1" href="//yandex.ru" data-bem="{"link":{"origTabindex":-1}}"><!--[if gt IE 8]><!--><img class="image" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI4MiIgaGVpZ2h0PSIzNCIgdmlld0JveD0iMCAwIDE2NDAgNjgwIj48cGF0aCBkPSJNNTU2IDIwMGgtNDdjLTQgMC02IDMtNiA1djE0NWgtODd2LTE0NWMwLTQtMi01LTUtNWgtNDdjLTQgMC02IDItNiA1djM2OGMwIDQgMiA2IDUgNmg0OGMzIDAgNS0yIDUtNnYtMTc2aDg3djE3NmMwIDQgMiA2IDYgNmg0N2M0IDAgNS0zIDUtNnYtMzY4YzAtMy0yLTUtNS01em0xMDY2IDMyOWMtMS0yLTItMy00LTMtNCAwLTI0IDgtNTQgOC01OCAwLTg2LTU1LTg2LTE0MyAwLTc3IDIzLTE1NCA2My0xNTQgMTEgMCAyMyAzIDQ0IDIyIDIgMiA0IDMgNiAzczUtMiA3LTVsMjAtMzNjMi0yIDItNSAyLTcgMC0zLTMtNS04LTgtMzEtMTYtNTItMTktNzAtMTktNzEgMC0xMjYgODUtMTI2IDIxNyAwIDExNCA1MyAxODAgMTI5IDE4MCAzMiAwIDY2LTE1IDgwLTI1IDMtMiA0LTUgMy04bC02LTI2em0tMzIzLTE1OGw5MS0xNjZjMi0yIDEtNS0yLTVoLTQ1Yy0xMyAwLTE3IDUtMjIgMTRsLTY4IDE0MmMtNCA4LTggMTQtMTEgMTZ2LTE2N2MwLTMtMi01LTUtNWgtNDljLTIgMC01IDItNSA1djM2OWMwIDIgMiA1IDUgNWg0OWMzIDAgNS0yIDUtNXYtMTkwYzIgMiA0IDQgNSA3bDg2IDE3N2M1IDkgMTEgMTEgMjEgMTFoNDhjMyAwIDQtMyAyLTVsLTEwNi0yMDN6bS00MzQgMTYxaC05Yy0xMSAwLTE0LTUtMTQtMTR2LTMxM2MwLTQtMi01LTUtNWgtMTUxYy00IDAtNiAyLTYgNXYyN2MwIDkyLTUgMjEwLTU0IDI5OWgtMTdjLTUgMC02IDItNiA2djExMWMwIDQgMyA1IDUgNWgzNmM4IDAgMTEtNiAxMS0xMXYtNjNoMTYydjY5YzAgMyAyIDUgNSA1aDM5YzUgMCA5LTQgOS0xMXYtMTA1YzAtNC0yLTYtNi02em0tODIgMGgtMTEwYzM5LTY2IDU0LTE0MCA1OS0yMzEgMi0yMCAyLTQwIDItNTNoNDh2Mjg0em0yMzYtMzQxYy04MiAwLTExOCAxMDMtMTE4IDIxNSAwIDExNCA1MiAxODMgMTI3IDE4MyAzNyAwIDcwLTE0IDg2LTI1IDMtMiA0LTQgMy03bC02LTI2Yy0xLTMtMi01LTYtNS0zIDAtMjUgOC01NiA4LTU4IDAtODYtNTEtODYtMTE3di0xOHMzMCA0IDQ3IDRoMTExdi0zMmMwLTExNy00Mi0xODAtMTAyLTE4MHptLTggMTY0Yy0xNyAwLTQ1IDMtNDUgM3MwLTExIDItMjNjNy02NCAyMy05NyA0OS05NyAyNCAwIDM5IDMzIDQzIDkyIDEgMTIgMSAyNiAxIDI2aC01MHoiLz48cGF0aCBmaWxsPSIjZjAwIiBkPSJNMjcxIDExaC04NmMtODUgMC0xNTcgNjQtMTU3IDE4OSAwIDc1IDM1IDEzMCA5NyAxNThsLTExNiAyMDljLTQgNyAwIDEyIDYgMTJoNTRjNSAwIDgtMiA5LTVsMTA1LTIwNWgzOHYyMDVjMCAyIDIgNSA1IDVoNDdjNSAwIDYtMiA2LTZ2LTU1NGMwLTUtMy04LTgtOHptLTUwIDMwOWgtMzJjLTUwIDAtOTgtMzYtOTgtMTI3IDAtOTUgNDUtMTMzIDkyLTEzM2gzOXYyNjB6Ii8+PC9zdmc+" alt="Яндекс" style="background-image: url(//yastatic.net/islands-page/_/UYmX3xSn-Z1WO7vNqgzY2H8bBIc.png);"/><!--<![endif]--><!--[if lte IE 8]><img class="image" src="//yastatic.net/islands-page/_/UYmX3xSn-Z1WO7vNqgzY2H8bBIc.png" alt="Яндекс"/><![endif]--></a></div><div class="header2__middle"><div class="header2__middle-wrap"><div class="header2__left"><form class="search2 search2_template_service suggest2-form suggest2-form__node suggest2-counter i-bem" action="/search" role="search" data-bem="{"suggest2-form":{},"suggest2-counter":{"submitBySelect":true,"suggestReqID":true,"service":"weather_ru_desktop","dataUrl":"https://pogoda.yandex.ru/zhukovskiy/"," ... alse}}"><a class="nameplate header2__nameplate" href="//pogoda.yandex.ru" tabindex="-1"><span class="nameplate__text">Погода</span></a><span class="input input_size_m input_type_normal input_focus_thin input_after-nameplate_yes input_theme_normal suggest2-form__input i-bem" data-bem="{"input":{"live":false}}"><label class="input__hint input__hint_visibility_visible" id="hintuniq1439568946106870215" for="header2input" aria-hidden="true">Город</label><span class="input__box"><input class="input__control" id="header2input" name="request" aria-labelledby="labeluniq1439568946106870215 hintuniq1439568946106870215"/><span class="input__clear" unselectable="on">&nbsp;</span></span></span><button class="button button_size_m button_side_right button_focus_thin button_theme_normal suggest2-form__button i-bem" type="submit" role="button" data-bem="{"button":{}}"><span class="button__text">Найти</span></button><div class="popup popup_theme_ffffff popup_autoclosable_yes popup_adaptive_no popup_animate_no suggest2 suggest2_theme_large suggest2_size_l suggest2_adaptive_yes suggest2_group_label suggest2_nameplate_ru suggest2_type_weather i-bem" data-bem="{"popup":{"directions":"bottom-left"},"suggest2":{"url":"//suggest.yandex.ru/suggest-ya.cgi","data":{"v":4,"uil":"ru","yu":"8334848161413980465","lr":20571,"srv":"weather_ru_desktop","wiz":"TrWth","fact":1,"hl":1,"n":10,"mob":0,"portal":1,"weather_host":"pogoda.yandex.ru","weather_page_lr":20571}}}"><div class="popup__under"></div><div class="popup__content"></div></div></form></div></div></div><div class="header2__nav"><div class="dropdown-menu dropdown-menu_user_yes dropdown-menu_theme_ffffff i-bem" data-bem="{"dropdown-menu":{}}"><a class="user user_menu_yes i-bem" role="button" tabindex="0" aria-haspopup="true" aria-expanded="false" href="https://passport.yandex.ru/passport?mode=passport" data-bem="{"user":{"uid":"8406994","login":"gagarin74"}}"><span class="user__icon" style="background-image: url(//avatars.yandex.net/get-yapic/8406994/islands-middle?rnd=1439749376421);"></span><span class="user__name" data-bem="{"user__name":{"maxLength":16,"maxLengthRelative":3,"isUglyUserName":false}}"><span class="user__first-letter">g</span>agarin74</span></a><div class="popup popup_theme_ffffff popup_autoclosable_yes popup_adaptive_yes popup_animate_yes popup_fade-out_no popup_watch-scroll_no dropdown-menu__popup dropdown-menu__popup_user_yes dropdown__popup i-bem popup" data-bem="{"popup":{"directions":"bottom-right"}}"><div class="popup__under"></div><i class="popup__tail"></i><div class="popup__content"><div class="b-menu-vert dropdown-menu__menu dropdown-menu__menu_theme_ffffff" role="menu"><ul class="b-menu-vert__layout"><li class="b-menu-vert__layout-unit b-menu-vert__layout-unit_position_first"><div class="b-menu-vert__item" role="menuitem"><a class="link" href="https://mail.yandex.ru"><img class="image image_icon_mail" src="//yastatic.net/lego/_/La6qi18Z8LwgnZdsAr1qy1GwCwo.gif" alt=""/><span class="link__text user-menu-update i-bem" data-bem="{"user-menu-update":{}}">Нет новых писем</span></a></div></li><li class="b-menu-vert__layout-unit"><div class="b-menu-vert__item" role="menuitem"><a class="link" href="https://mail.yandex.ru/compose">Написать письмо</a></div></li><li class="b-menu-vert__layout-unit"><div class="b-menu-vert__item" role="menuitem"><a class="link" href="https://disk.yandex.ru?source=main-loginmenu"><img class="image image_icon_disk" src="//yastatic.net/lego/_/La6qi18Z8LwgnZdsAr1qy1GwCwo.gif" alt=""/><span class="link__text">Мой Диск</span></a></div></li><li class="b-menu-vert__layout-unit"><div class="b-menu-vert__item b-menu-vert__item_separator_yes" role="menuitem"></div></li><li class="b-menu-vert__layout-unit"><div class="b-menu-vert__item" role="menuitem"><a class="link" href="http://tune.yandex.ru">Настройка</a></div></li><li class="b-menu-vert__layout-unit"><div class="b-menu-vert__item" role="menuitem"><a class="link" href="https://passport.yandex.ru">Паспорт</a></div></li><li class="b-menu-vert__layout-unit b-menu-vert__layout-unit_position_last"><div class="b-menu-vert__item" role="menuitem"><a class="link user user__logout i-bem" href="https://passport.yandex.ru/passport?mod ... kovskiy%2F" data-bem="{"user":{"_uniqId":"user__logout"}}">Выйти</a></div></li></ul></div></div></div></div></div></div></div><div class="content"><div class="content__top clearfix"><div class="adsrv adsrv_pos_top i-bem" style="position:static!important;display:block!important;visibility:visible!important;opacity:1!important;" data-bem="{"adsrv":{}}"><style rel="stylesheet">.adsrv a{text-decoration:none!important;}.adsrv a:hover,.adsrv__text_sitelinks a:hover,.adsrv__text_contacts a:hover{color:#DD0000!important;}.adsrv__logo,.adsrv__logo a:hover{color:#000000!important;}.adsrv__title a{color:#0000CC!important;}.adsrv__text{color:#000000!important;}.adsrv__text_sitelinks a{color:#0000CC!important;}.adsrv__text_contacts a{color:#006600!important;}.adsrv__text_sitelinks a:hover,.adsrv__text_contacts a:hover{color:#DD0000!important;}</style><div class="adsrv__logo" style="position:static!important;display:inline-block!important;visibility:visible!important;opacity:1!important;"><a class="adsrv__link" href="https://direct.yandex.ru/?partner" target="_blank" style="position:static!important;display:inline!important;visibility:visible!important;opacity:1!important;">Яндекс.Директ</a></div><div class="adsrv__item" style="position:static!important;display:block!important;visibility:visible!important;opacity:1!important;"><div class="adsrv__title" style="position:relative!important;display:block!important;visibility:visible!important;opacity:1!important;"><a class="adsrv__link" href="https://an.yandex.ru/count/I_ZFsE7potS4 ... ?stat-id=5" target="_blank" style="position:static!important;display:inline!important;visibility:visible!important;opacity:1!important;"><img class="adsrv__favicon" src="//favicon.yandex.net/favicon/stol-transformer.net" alt=""/>Стол трансформер недорого!</a></div><div class="adsrv__text" style="position:static!important;display:block!important;visibility:visible!important;opacity:1!important;">Стол трансформер! 13 000 руб. От производителя. Бесплатная доставка. Жми!</div><div class="adsrv__text adsrv__text_sitelinks" style="position:static!important;display:block!important;visibility:visible!important;opacity:1!important;"><a class="adsrv__link" href="https://an.yandex.ru/count/I_ZFsAbrxbq4 ... ?stat-id=5" target="_blank" style="position:static!important;display:inline!important;visibility:visible!important;opacity:1!important;">Оплата</a><a class="adsrv__link" href="https://an.yandex.ru/count/I_ZFs16bzsG4 ... ?stat-id=5" target="_blank" style="position:static!important;display:inline!important;visibility:visible!important;opacity:1!important;">Доставка</a><a class="adsrv__link" href="https://an.yandex.ru/count/I_ZFs3Xvf0a4 ... ?stat-id=5" target="_blank" style="position:static!important;display:inline!important;visibility:visible!important;opacity:1!important;">Обеденный стол</a><a class="adsrv__link" href="https://an.yandex.ru/count/I_ZFs9y8wRq4 ... ?stat-id=5" target="_blank" style="position:static!important;display:inline!important;visibility:visible!important;opacity:1!important;">Журнальный стол</a></div><div class="adsrv__text adsrv__text_contacts" style="position:static!important;display:block!important;visibility:visible!important;opacity:1!important;"><a class="adsrv__link" href="https://an.yandex.ru/count/I_ZFsE7potS4 ... ?stat-id=5" target="_blank" style="position:static!important;display:inline!important;visibility:visible!important;opacity:1!important;">stol-transformer.net</a><a class="adsrv__link" href="https://an.yandex.ru/count/I_ZFs9kNFi04 ... ?stat-id=5" target="_blank" style="position:static!important;display:inline!important;visibility:visible!important;opacity:1!important;">Адрес&nbsp;и&nbsp;телефон</a></div></div><div class="adsrv__item" style="position:static!important;display:block!important;visibility:visible!important;opacity:1!important;"><div class="adsrv__title" style="position:relative!important;display:block!important;visibility:visible!important;opacity:1!important;"><a class="adsrv__link" href="https://an.yandex.ru/count/I_ZFs8AKn704 ... ?stat-id=5" target="_blank" style="position:static!important;display:inline!important;visibility:visible!important;opacity:1!important;"><img class="adsrv__favicon" src="//favicon.yandex.net/favicon/www.homeme.ru" alt=""/>Стол-трансформер недорого!</a></div><div class="adsrv__text" style="position:static!important;display:block!important;visibility:visible!important;opacity:1!important;">Хит продаж! Спешите купить по акции со скидкой! Доставка за 1 день!</div><div class="adsrv__text adsrv__text_sitelinks" style="position:static!important;display:block!important;visibility:visible!important;opacity:1!important;"><a class="adsrv__link" href="https://an.yandex.ru/count/I_ZFsB3WkbS4 ... ?stat-id=5" target="_blank" style="position:static!important;display:inline!important;visibility:visible!important;opacity:1!important;">Дуб кремона</a><a class="adsrv__link" href="https://an.yandex.ru/count/I_ZFs2x2iZa4 ... ?stat-id=5" target="_blank" style="position:static!important;display:inline!important;visibility:visible!important;opacity:1!important;">Дуб феррара</a><a class="adsrv__link" href="https://an.yandex.ru/count/I_ZFsDG8HXa4 ... ?stat-id=5" target="_blank" style="position:static!important;display:inline!important;visibility:visible!important;opacity:1!important;">Орех</a></div><div class="adsrv__text adsrv__text_contacts" style="position:static!important;display:block!important;visibility:visible!important;opacity:1!important;"><a class="adsrv__link" href="https://an.yandex.ru/count/I_ZFs8AKn704 ... ?stat-id=5" target="_blank" style="position:static!important;display:inline!important;visibility:visible!important;opacity:1!important;">www.homeme.ru</a><a class="adsrv__link" href="https://an.yandex.ru/count/I_ZFs5Qwtb44 ... ?stat-id=5" target="_blank" style="position:static!important;display:inline!important;visibility:visible!important;opacity:1!important;">Адрес&nbsp;и&nbsp;телефон</a></div></div><i style="background:url(https://an.yandex.ru/count/I_ZFs9pzCja4 ... ?stat-id=5)"></i></div><div class="navigation-city"><h1 class="title title_level_1">Погода в Жуковском</h1><span class="navigation-city__info"><div class="dropdown dropdown_action_closed navigation-city__item navigation-city__city-switcher i-bem" data-bem="{"dropdown":{}}"><div class="dropdown__switcher"><button class="button button_size_s button_pseudo_yes button_theme_pseudo i-bem" type="button" role="button" data-bem="{"button":{}}"><span class="button__text">другой город</span></button></div><div class="popup popup_theme_ffffff popup_autoclosable_yes popup_adaptive_yes popup_animate_yes navigation-city__last-cities dropdown__popup"><div class="popup__under"></div><i class="popup__tail"></i><div class="popup__content"><ul class="last-cities"><li class="last-cities__item"><a class="link last-cities__name" href="/yaroslavl">Ярославль<span class="last-cities__temp">+14 °C</span></a></li><li class="last-cities__item"><a class="link last-cities__name" href="/vologda">Вологда<span class="last-cities__temp">+10 °C</span></a></li><li class="last-cities__item last-cities__item_type_all-cities"><a class="link last-cities__name" href="/zhukovskiy/choose">Все города</a></li></ul></div></div></div></span></div><div class="current-weather"><div class="current-weather__today">Сейчас <span class="current-weather__local-time">21:22</span></div><span class="current-weather__col current-weather__col_type_now t t_c_13"><i class="icon icon_size_48 icon_thumb_skc-n" data-width="48"></i><span class="current-weather__comment">ясно</span><div class="current-weather__thermometer current-weather__thermometer_type_now">+13 °C</div></span><span class="current-weather__col current-weather__col_type_after t t_c_12"><span class="current-weather__thermometer-name">ночью</span><i class="icon icon_thumb_ovc icon_size_30" data-width="30"></i><div class="current-weather__thermometer current-weather__thermometer_type_after">+12</div></span><span class="current-weather__col current-weather__col_type_after t t_c_13"><span class="current-weather__thermometer-name">утром</span><i class="icon icon_thumb_ovc icon_size_30" data-width="30"></i><div class="current-weather__thermometer current-weather__thermometer_type_after">+13</div></span><span class="current-weather__col current-weather__info"><div class="current-weather__info-row"><span class="current-weather__info-label">Восход: </span>05:00<span class="current-weather__info-label current-weather__info-label_type_sunset">Закат: </span>20:01</div><div class="current-weather__info-row current-weather__info-row_type_wind"><span class="current-weather__info-label">Ветер: </span> <span class="wind-speed">5,0 м/с</span> <abbr class=" icon-abbr" title="Ветер: северный">С</abbr><i class="icon icon_size_12 icon_wind_n icon_wind" data-width="12"></i></div><div class="current-weather__info-row"><span class="current-weather__info-label">Влажность: </span>82%</div><div class="current-weather__info-row"><span class="current-weather__info-label">Давление: </span>745 мм рт. ст.</div><div class="current-weather__info-row current-weather__info-row_type_time">Данные на 21:00</div></span><div class="current-weather__yesterday">Вчера в это время: +15</div></div></div><div class="forecasts"><div class="tabs tabs_control_buttons tabs_size_s tabs_links_yes tabs-panes i-bem" data-bem="{"tabs":{},"tabs-panes":{"id":"forecasts"}}"><span class="radio-button radio-button_size_s radio-button_links_yes radio-button_theme_normal tabs__control i-bem" role="tablist" data-bem="{"radio-button":{"live":false}}"><label class="radio-button__radio radio-button__radio_current_yes radio-button__radio_link_yes radio-button__radio_checked_yes radio-button__radio_pressed_yes radio-button__radio_side_left tabs__radio" for="uniq1439568946106870213" role="tab" id="forecasts-tab-0" aria-selected="false"><input class="radio-button__control" value="briefly" checked="checked" id="uniq1439568946106870213" type="radio" name="tabs-menu-buttons-392172"/><span class="radio-button__text"><a class="link" href="/zhukovskiy" tabindex="-1"><span class="radio-button__text">кратко</span></a></span></label><label class="radio-button__radio radio-button__radio_link_yes radio-button__radio_side_right radio-button__radio_next-for-pressed_yes tabs__radio" for="uniq1439568946106870214" role="tab" id="forecasts-tab-1" aria-selected="false"><input class="radio-button__control" value="details" id="uniq1439568946106870214" type="radio" name="tabs-menu-buttons-392172"/><span class="radio-button__text"><a class="link" href="/zhukovskiy/details" tabindex="-1"><span class="radio-button__text">подробно</span></a></span></label></span></div><div class="tabs-panes i-bem" data-bem="{"tabs-panes":{"id":"forecasts"}}"><div class="tabs-panes__pane tabs-panes__pane_active_yes" role="tabpanel" aria-labelledby="forecasts-tab-0" aria-expanded="true"><ul class="forecast-brief forecast-item"><li class="forecast-brief__item"><div class="forecast-brief__item-date"><span class="forecast-brief__item-dayname">завтра</span><span class="forecast-brief__item-day">17 августа</span></div><div class="forecast-brief__item-description t t_c_16"><i class="icon icon_thumb_ovc icon_size_30" data-width="30"></i><div class="forecast-brief__item-comment">пасмурно</div><div class="forecast-brief__item-temp-day" title="Максимальная температура днём">+16 днём</div></div><div class="forecast-brief__item-temp-night t t_c_9" title="Минимальная температура ночью">+9 ночью</div></li><li class="forecast-brief__item"><div class="forecast-brief__item-date"><span class="forecast-brief__item-dayname">вт</span><span class="forecast-brief__item-day">18</span></div><div class="forecast-brief__item-description t t_c_16"><i class="icon icon_thumb_ovc-m-ra icon_size_30" data-width="30"></i><div class="forecast-brief__item-comment">пасмурно, небольшой дождь</div><div class="forecast-brief__item-temp-day" title="Максимальная температура днём">+16</div></div><div class="forecast-brief__item-temp-night t t_c_12" title="Минимальная температура ночью">+12</div></li><li class="forecast-brief__item"><div class="forecast-brief__item-date"><span class="forecast-brief__item-dayname">ср</span><span class="forecast-brief__item-day">19</span></div><div class="forecast-brief__item-description t t_c_18"><i class="icon icon_thumb_ovc icon_size_30" data-width="30"></i><div class="forecast-brief__item-comment">пасмурно</div><div class="forecast-brief__item-temp-day" title="Максимальная температура днём">+18</div></div>
gagarin74
Сообщения: 330
Зарегистрирован: Пн апр 06, 2015 9:51 am
Благодарил (а): 37 раз
Поблагодарили: 22 раза

Re: web переменные и их обновления.Нужна помощь.

Сообщение gagarin74 » Вс авг 16, 2015 9:30 pm

вот что в логах переменной
2015-08-16 21:20:52: +16 X
2015-08-16 20:53:30: +16 X
2015-08-16 19:53:22: +18 X
2015-08-16 18:53:14: +21 X
2015-08-16 17:53:08: +20 X
2015-08-16 16:52:58: +22 X
2015-08-16 15:52:50: +22 X
2015-08-16 14:52:42: +21 X
2015-08-16 13:52:33: +21 X
2015-08-16 12:52:25: +20 X
olehs
Сообщения: 1115
Зарегистрирован: Вс июн 14, 2015 11:08 am
Благодарил (а): 85 раз
Поблагодарили: 342 раза

Re: web переменные и их обновления.Нужна помощь.

Сообщение olehs » Вс авг 16, 2015 9:33 pm

У меня по такому адресу вообще не получилась температура. Там, кажется, происходит попытка авторизации, редирект или еще что.
Попробуйте через API, там возвращается XML без всяких обвесов
https://export.yandex.ru/weather-ng/forecasts/27626.xml

Код города взят отсюда https://pogoda.yandex.ru/static/cities.xml

Вот так я получаю текущую погоду
<temperature.+?>(.+?)<\/temperature>
olehs
Сообщения: 1115
Зарегистрирован: Вс июн 14, 2015 11:08 am
Благодарил (а): 85 раз
Поблагодарили: 342 раза

Re: web переменные и их обновления.Нужна помощь.

Сообщение olehs » Вс авг 16, 2015 9:36 pm

gagarin74 писал(а):вот что в логах переменной
2015-08-16 21:20:52: +16 X
2015-08-16 20:53:30: +16 X
2015-08-16 19:53:22: +18 X
2015-08-16 18:53:14: +21 X
2015-08-16 17:53:08: +20 X
2015-08-16 16:52:58: +22 X
2015-08-16 15:52:50: +22 X
2015-08-16 14:52:42: +21 X
2015-08-16 13:52:33: +21 X
2015-08-16 12:52:25: +20 X
Ага, т.е. данные Вы получаете. А что сейчас записалось в свойство объекта?
gagarin74
Сообщения: 330
Зарегистрирован: Пн апр 06, 2015 9:51 am
Благодарил (а): 37 раз
Поблагодарили: 22 раза

Re: web переменные и их обновления.Нужна помощь.

Сообщение gagarin74 » Вс авг 16, 2015 9:36 pm

+16
а по вашей ссылки у меня 403 - Forbidden
olehs
Сообщения: 1115
Зарегистрирован: Вс июн 14, 2015 11:08 am
Благодарил (а): 85 раз
Поблагодарили: 342 раза

Re: web переменные и их обновления.Нужна помощь.

Сообщение olehs » Вс авг 16, 2015 9:40 pm

Ссылку нужно скопировать в новое окно браузера (они Refferer проверяют)
gagarin74
Сообщения: 330
Зарегистрирован: Пн апр 06, 2015 9:51 am
Благодарил (а): 37 раз
Поблагодарили: 22 раза

Re: web переменные и их обновления.Нужна помощь.

Сообщение gagarin74 » Вс авг 16, 2015 9:41 pm

и в дополнении. Я же упоминал ,что такое происходит не только с "настоящими веб страницами".а так же и с домашними.У моего датчика температуры есть своя вебка. так вот умный дом "берет" с неё последнее значение,даже если датчик отключен.
Ответить