【求助】城市不显示
rainmeter吧
全部回复
仅看楼主
level 3
萌新用着亦雪颜绝大佬的clock&weather,不知道改错什么天气不显示了
[rainmeter]
update=1000
[Metadata]
Name=Clock&Weather
Author=
Version=0.1.1
Description=时钟,闹钟(定时和整点),天气(基于网页抓取)
[Variables]
City=yuci
;城市
face=
;字体
fcolor=255,255,255
fcolor_m=0,0,0
;字体颜色
sizex=10
;设置整个皮肤的大小
;StringStyle=Bold
;要加粗字体在相应节点输入以下代码(去掉“;”)
;这是闹钟报时的设置
remh=22
;设置提醒的时
remm=35
;设置提醒的分
rem=reimu_早上好.wav
;设置提醒的铃声
switch1=1
;闹钟开关,关闭闹钟修改值为1
hour=[Measurehour]
;这个不要改动
switch2=1
;报时开关,关闭报时修改值为1
;-----------------------时钟读取-------------------------
;---------------------------------------------------------
[Measurehour]
Measure=Time
Format=%H
[Measureminute]
Measure=Time
Format=%M
[Measuresec]
Measure=Time
Format=%S
[MeasureAMPM]
Measure=Time
Format=%p
[Measuremonth]
Measure=Time
Format=%m
[Measureday]
Measure=Time
Format=%d
[Measureyear]
Measure=Time
Format=%Y
[Measureweek]
Measure=Time
Format=%A
Substitute="Monday":"星期一","Tuesday":"星期二","Wednesday":"星期三","Thursday":"星期四","Friday":"星期五","Saturday":"星期六","Sunday":"星期日"
;-----------------------时钟显示-------------------------
;---------------------------------------------------------
[Meterclock]
Meter=String
Measurename=Measurehour
Measurename2=Measureminute
FontFace=
#face#

FontSize=(30*(1+
#sizex#
/10))
StringAlign=left
FontColor=
#fcolor#

x=(40*(1+
#sizex#
/10))
y=(24*(1+
#sizex#
/10))
Solidcolor=0,0,0,1
AntiAlias=1
text=%1:%2
Dynamicvariables=1
[Meterweek]
Meter=String
Measurename=Measureweek
FontFace=
#face#

FontSize=(7*(1+
#sizex#
/10))
StringAlign=left
FontColor=
#fcolor#

x=(60*(1+
#sizex#
/10))
y=(14*(1+
#sizex#
/10))
w=(100*(1+
#sizex#
/10))
h=(20*(1+
#sizex#
/10))
AntiAlias=1
Text=%1
Dynamicvariables=1
[Meterdate]
Meter=String
Measurename=Measureyear
Measurename2=Measuremonth
Measurename3=Measureday
FontFace=
#face#

FontSize=(8*(1+
#sizex#
/10))
StringAlign=left
FontColor=
#fcolor#

x=(85*(1+
#sizex#
/10))+10
y=(13*(1+
#sizex#
/10))
AntiAlias=1
text=%1/%2/%3
Dynamicvariables=1
[Metersec]
Meter=String
Measurename=Measuresec
x=(35*(1+
#sizex#
/10))
y=(28*(1+
#sizex#
/10))+7
w=(20*(1+
#sizex#
/10))
h=(20*(1+
#sizex#
/10))
FontFace=
#face#

FontSize=(10*(1+
#sizex#
/10))
StringAlign=center
FontColor=
#fcolor#

AntiAlias=1
Dynamicvariables=1
[MeterAMPM]
Meter=String
MeasureName=MeasureAMPM
FontFace=
#face#

FontSize=(10*(1+
#sizex#
/10))-3
StringAlign=center
FontColor=
#fcolor#

X=(35*(1+
#sizex#
/10))
Y=(28*(1+
#sizex#
/10))+45
AntiAlias=1
Dynamicvariables=1
;----------------------闹钟设置界面--------------------
;--------------------------------------------------------
[Alarm]
Meter=Image
ImageName=#@#\image\闹钟.png
SolidColor=0,0,0,1
x=(15*(1+
#sizex#
/10))
y=(28*(1+
#sizex#
/10))
w=25
h=25
ToolTipText="闹钟设置"
MouseOverAction=[!ShowMeter "PlayerOptions"][!ShowMeter "Music1 Text"][!ShowMeter "Music2 Text"][!ShowMeter "Music3 Text"][!ShowMeter "Music4 Text"][!ShowMeter "Music5 Text"][!ShowMeter "Music6 Text"][!ShowMeter "Timeset Text"][!ShowMeter "Timeset_h"][!ShowMeter "Timeset_m"]
MouseLeaveAction=[!HideMeter "PlayerOptions"][!HideMeter "Music1 Text"][!HideMeter "Music2 Text"][!HideMeter "Music3 Text"][!HideMeter "Music4 Text"][!HideMeter "Music5 Text"][!HideMeter "Music6 Text"][!HideMeter "Timeset Text"][!HideMeter "Timeset_h"][!HideMeter "Timeset_m"]
[Background]
Meter=Image
SolidColor=0,0,0,0
X=(5*(1+
#sizex#
/10))
Y=(80*(1+
#sizex#
/10))
W=300
H=170
MouseOverAction=[!ShowMeter "PlayerOptions"][!ShowMeter "Music1 Text"][!ShowMeter "Music2 Text"][!ShowMeter "Music3 Text"][!ShowMeter "Music4 Text"][!ShowMeter "Music5 Text"][!ShowMeter "Music6 Text"][!ShowMeter "Timeset Text"][!ShowMeter "Timeset_h"][!ShowMeter "Timeset_m"]
MouseLeaveAction=[!HideMeter "PlayerOptions"][!HideMeter "Music1 Text"][!HideMeter "Music2 Text"][!HideMeter "Music3 Text"][!HideMeter "Music4 Text"][!HideMeter "Music5 Text"][!HideMeter "Music6 Text"][!HideMeter "Timeset Text"][!HideMeter "Timeset_h"][!HideMeter "Timeset_m"]
[PlayerOptions]
Meter=Image
ImageName=#@#\image\背景.png
SolidColor=0,0,0,1
x=(5*(1+
#sizex#
/10))
y=(80*(1+
#sizex#
/10))
w=300
h=170
Hidden=1
[Music1 Text]
Meter=String
x=(18*(1+
#sizex#
/10))
y=(87*(1+
#sizex#
/10))
FontFace=
#face#

FontSize=(7*(1+
#sizex#
/10))
FontColor=#fcolor_m#
StringAlign=left
StringAlign=CENTER
AntiAlias=1
Text="闹钟1:早上好"
Hidden=1
[Music2 Text]
Meter=String
x=(18*(1+
#sizex#
/10))
y=(97*(1+
#sizex#
/10))
FontFace=
#face#

FontSize=(7*(1+
#sizex#
/10))
FontColor=#fcolor_m#
StringAlign=left
StringAlign=CENTER
AntiAlias=1
Text="闹钟2:看看窗外吧"
Hidden=1
[Music3 Text]
Meter=String
x=(18*(1+
#sizex#
/10))
y=(107*(1+
#sizex#
/10))
FontFace=
#face#

FontSize=(7*(1+
#sizex#
/10))
FontColor=#fcolor_m#
StringAlign=left
StringAlign=CENTER
AntiAlias=1
Text="闹钟3:那让我们开始吧"
Hidden=1
[Music4 Text]
Meter=String
x=(18*(1+
#sizex#
/10))
y=(117*(1+
#sizex#
/10))
FontFace=
#face#

FontSize=(7*(1+
#sizex#
/10))
FontColor=#fcolor_m#
StringAlign=left
StringAlign=CENTER
AntiAlias=1
Text="闹钟4:工作辛苦了"
Hidden=1
[Music5 Text]
Meter=String
x=(18*(1+
#sizex#
/10))
y=(127*(1+
#sizex#
/10))
FontFace=
#face#

FontSize=(7*(1+
#sizex#
/10))
FontColor=#fcolor_m#
StringAlign=left
StringAlign=CENTER
AntiAlias=1
Text="闹钟5:我们一起畅谈未来吧"
Hidden=1
[Music6 Text]
Meter=String
x=(18*(1+
#sizex#
/10))
y=(137*(1+
#sizex#
/10))
FontFace=
#face#

FontSize=(7*(1+
#sizex#
/10))
FontColor=#fcolor_m#
StringAlign=left
StringAlign=CENTER
AntiAlias=1
Text="闹钟6:差不多该睡觉了哦"
Hidden=1
[Timeset Text]
Meter=String
x=(18*(1+
#sizex#
/10))
y=(147*(1+
#sizex#
/10))
FontFace=
#face#

FontSize=(7*(1+
#sizex#
/10))
FontColor=#fcolor_m#
StringAlign=left
StringAlign=CENTER
AntiAlias=1
Text="闹钟时间"
Hidden=1
[Timeset_h]
Meter=String
x=(68*(1+
#sizex#
/10))
y=(147*(1+
#sizex#
/10))
FontFace=
#face#

FontSize=(7*(1+
#sizex#
/10))
FontColor=#fcolor_m#
StringAlign=left
StringAlign=CENTER
AntiAlias=1
Text="#remh#:"
Hidden=1
ClipString=2
LeftMouseUpAction=[!CommandMeasure "TimeInput_h ExecuteBatch 1-2"]
ToolTipText=点此修改闹钟小时
SolidColor=255,255,255,1
[Timeset_m]
Meter=String
x=(78*(1+
#sizex#
/10))
y=(147*(1+
#sizex#
/10))
FontFace=
#face#

FontSize=(7*(1+
#sizex#
/10))
FontColor=#fcolor_m#
StringAlign=left
StringAlign=CENTER
AntiAlias=1
Text=":#remm#"
Hidden=1
ClipString=2
LeftMouseUpAction=[!CommandMeasure "TimeInput_m ExecuteBatch 1-2"]
ToolTipText=点此修改闹钟分钟
SolidColor=255,255,255,1
[m1]
Meter=String
Solidcolor=0,0,0,0
x=(18*(1+
#sizex#
/10))
y=(86*(1+
#sizex#
/10))
w=250
h=20
LeftMouseUpAction=[!WriteKeyValue Variables rem "reimu_早上好.wav"][play "#@#\remind\reimu_早上好.wav"]
[m2]
Meter=String
Solidcolor=0,0,0,0
x=(18*(1+
#sizex#
/10))
y=(96*(1+
#sizex#
/10))
w=250
h=20
LeftMouseUpAction=[!WriteKeyValue Variables rem "reimu_看看窗外吧,很舒服的早晨哦.wav"][play "#@#\remind\reimu_看看窗外吧,很舒服的早晨哦.wav"]
[m3]
Meter=String
Solidcolor=0,0,0,0
x=(18*(1+
#sizex#
/10))
y=(106*(1+
#sizex#
/10))
w=250
h=20
LeftMouseUpAction=[!WriteKeyValue Variables rem "reimu_那让我们开始吧,从一……不,从零开始.wav"][play "#@#\remind\reimu_那让我们开始吧,从一……不,从零开始.wav"]
[m4]
Meter=String
Solidcolor=0,0,0,0
x=(18*(1+
#sizex#
/10))
y=(116*(1+
#sizex#
/10))
w=250
h=20
LeftMouseUpAction=[!WriteKeyValue Variables rem "reimu_工作辛苦了,洗澡水已经准备好了.wav"][play "#@#\remind\reimu_工作辛苦了,洗澡水已经准备好了.wav"]
[m5]
Meter=String
Solidcolor=0,0,0,0
x=(18*(1+
#sizex#
/10))
y=(126*(1+
#sizex#
/10))
w=250
h=20
LeftMouseUpAction=[!WriteKeyValue Variables rem "reimu_我们一起畅谈未来吧.wav"][play "#@#\remind\reimu_我们一起畅谈未来吧.wav"]
[m6]
Meter=String
Solidcolor=0,0,0,0
x=(18*(1+
#sizex#
/10))
y=(136*(1+
#sizex#
/10))
w=250
h=20
LeftMouseUpAction=[!WriteKeyValue Variables rem "reimu_差不多该睡觉了哦.wav"][play "#@#\remind\reimu_差不多该睡觉了哦.wav"]
[TimeInput_h]
Measure=Plugin
Plugin=InputText.dll
SolidColor=255,255,255
FontColor=0,0,0
FontFace=
#face#

FontSize=(7*(1+
#sizex#
/10))
StringStyle=NORMAL
x=(68*(1+
#sizex#
/10))
y=(147*(1+
#sizex#
/10))
w=50
h=20
FocusDismiss=1
DefaultValue="Change Me!"
Command1=!WriteKeyValue Variables remh "$UserInput$" DefaultValue="0-23"
Command2=!Refresh
[TimeInput_m]
Measure=Plugin
Plugin=InputText.dll
SolidColor=255,255,255
FontColor=0,0,0
FontFace=
#face#

FontSize=(7*(1+
#sizex#
/10))
StringStyle=NORMAL
x=(78*(1+
#sizex#
/10))
y=(147*(1+
#sizex#
/10))
w=50
h=20
FocusDismiss=1
DefaultValue="Change Me!"
Command1=!WriteKeyValue Variables remm "$UserInput$" DefaultValue="0-59"
Command2=!Refresh
;------------------------闹钟判定----------------------
;-------------------------------------------------------
[remind]
Measure=Calc
Formula=Measurehour*60+Measureminute
Ifequalvalue=(#remh#*60+#remm#)
Ifequalaction=[play "#@#\remind\#rem#"]
Dynamicvariables=1
Disabled=1
;---------------------整点报时判定--------------------
;-------------------------------------------------------
[timer]
Measure=Calc
Formula=Measurehour+Measureminute
Ifequalvalue=[Measurehour]
Ifequalaction=[play "#@#vocal\#hour#.wav"]
Dynamicvariables=1
Disabled=1
;---------------------天气数据读取--------------------
;-------------------------------------------------------
[MeasureCity]
Measure=WebParser
UpdateRate=600
URL=http://www.baidu.com/s?wd=#City#%E5%A4%A9%E6%B0%94&ie=UTF-8
RegExp=(?siU)<div class="hit_top_new" id="super_se_tip"><div class="c-gap-bottom-small f13"><span><i class="c-icon c-icon-bear-circle c-gap-right-small res-queryext-pos"></i><strong class="c-gray">已显示“</strong><strong>(.*)天气</strong><strong class="c-gray">”
StringIndex=1
[MeasureTempNow]
Measure=WebParser
UpdateRate=600
URL=http://www.baidu.com/s?wd=#City#%E5%A4%A9%E6%B0%94&ie=UTF-8
RegExp=(?siU)<span class="op_weather4_twoicon_shishi_title">(.*)</span>
StringIndex=1
[MeasureTempOver]
Measure=WebParser
UpdateRate=600
URL=http://www.baidu.com/s?wd=#City#%E5%A4%A9%E6%B0%94&ie=UTF-8
RegExp=(?siU)<p class="op_weather4_twoicon_temp">(.*)</p>
StringIndex=1
[MeasureTempSite]
Measure=WebParser
UpdateRate=600
URL=http://www.baidu.com/s?wd=#City#%E5%A4%A9%E6%B0%94&ie=UTF-8
RegExp=(?siU)<i class="op_weather4_twoicon_shishi_sub">(.*)\(.*</i>
StringIndex=1
[MeasureCurrIcon]
Measure=WebParser
UpdateRate=600
Url=http://www.baidu.com/s?wd=#City#%E5%A4%A9%E6%B0%94&ie=UTF-8RegExp=(?siU)
StringIndex=1
Download=1
;---------------------天气数据显示--------------------
;-------------------------------------------------------
[styleWeatherText]
StringAlign=Right
FontColor=
#fcolor#

FontFace=
#face#

FontSize=(8*(1+
#sizex#
/10))
AntiAlias=1
[meterCityName]
Meter=String
MeasureName=MeasureCity
FontColor=
#fcolor#

AntiAlias=1
FontFace=
#face#

FontSize=(10*(1+
#sizex#
/10))
x=47
y=(12*(1+
#sizex#
/10))
ClipString=2
AntiAlias=1
LeftMouseUpAction=[!CommandMeasure "CityInput ExecuteBatch 1-2"]
ToolTipText=点击修改城市
SolidColor=255,255,255,1
[meterTempNow]
meter=string
MeasureName=MeasureTempNow
MeterStyle=styleWeatherText
StringStyle=Bold
X=120
Y=(64*(1+
#sizex#
/10))+1
Text=%1℃
[meterTempOver]
meter=string
MeasureName=MeasureTempOver
MeterStyle=styleWeatherText
X=230
Y=(64*(1+
#sizex#
/10))+1
Text="%1"
[meterTempSite]
meter=string
MeasureName=MeasureTempSite
MeterStyle=styleWeatherText
X=295
Y=(64*(1+
#sizex#
/10))+1
Text="%1"
[meterCurrImage]
Meter=Image
MeasureName=MeasureCurrIcon
X=36
Y=(63*(1+
#sizex#
/10))+2
W=25
H=25
ToolTipText="点击查看天气详情"
LeftMouseUpAction=["E:\Program Files (x86)\360se6\Application\360se.exe" "http://www.weather.com.cn/weather1d/101100402.shtml"]
;---------------------天气数据刷新--------------------
;-------------------------------------------------------
[meterRresh]
Meter=Image
Imagename=#@#\image\刷新.ico
SolidColor=0,0,0,1
X=295
Y=(64*(1+
#sizex#
/10))+2
w=25
h=25
ToolTipText="点击立即刷新天气"
LeftMouseUpAction=[!CommandMeasure MeasureTempNow "Update"][!CommandMeasure MeasureTempOver "Update"][!CommandMeasure MeasureTempSite "Update"][!CommandMeasure MeasureCurrIcon "Update"]
;---------------------修改城市------------------------
;------------------------------------------------------
[CityInput]
Measure=Plugin
Plugin=InputText.dll
SolidColor=255,255,255
FontColor=0,0,0
FontFace=
#face#

FontSize=(10*(1+
#sizex#
/10))
StringStyle=NORMAL
X=49
Y=(12*(1+
#sizex#
/10))+4
H=28
W=130
FocusDismiss=1
DefaultValue="Change Me!"
Command1=!WriteKeyValue Variables City "$UserInput$" DefaultValue="拼音"
Command2=!Refresh
2020年01月20日 01点01分 1
level 3
RegExp=(?siU)<div id="hit_top_new" id="super_se_tip"><div class="c-gap-bottom-small f13"><span><i class="c-icom c-icon-bear-circle c-gap-right-small res-queryext-pos"></i><strong class="c-gray">已显示“</strong><strong>(.*)天气</strong><strong class="c-gray">”的搜索结果。</strong>
是这句问题么?应该怎么改呀
2020年01月20日 03点01分 3
查了下,那个页面“已显示”这个词只出现过一次,所以上面那一大串简单写成下面那样子就可以了:已显示“</strong><strong>(.*)天气 ////同样地,</strong><strong>也只出现一次,所以可以再简化成:</strong><strong>(.*)天气
2020年01月20日 08点01分
其实你都知道自己要查的是哪个地方的天气了,干脆把那些跟地方名相当的段删除掉,自己手打就好啦
2020年01月20日 08点01分
RegExp=(?siU)</strong><strong>(.*)天气
2020年01月20日 08点01分
谢谢大佬!显示出来了!
2020年01月20日 10点01分
吧务
level 9
我稍微看了一下,用rainmeter访问现在的url返回的代码里面已经没有需要的信息了,也就是说现在这个url已经不能用了
这个软件是可以看到rainmeter访问url网站时返回的信息代码,regexp就是基于这些信息检索出需要用的,然后再显示的
由上面图片可以看出,rainmeter得到的代码里面已经没有天气信息了
2020年01月20日 11点01分 4
所以就是这个网站不能用了嘛...得用nowapi那个?
2020年01月20日 11点01分
@愚人狂乱▫ 光换网站也不行,就好比你原来要筛面粉做饼,现在要筛小米做饼了,光换了材料不行,还要换筛子(regexp),换了筛子也不够,因为做饼的工序不一样了,还要换机器(显示节点),那么换了这么多为什么不直接搞做小米饼的机器呢(换个能用的天气皮肤)[滑稽]
2020年01月20日 11点01分
@朱门高悬云帆♋ 找不到一个简约还功能齐全的...社区那边一言难尽...翻去DA太慢了
2020年01月20日 11点01分
2020年01月20日 11点01分
level 3
大佬大佬,现在的问题是这个数据即便我刷新也不同步...
2020年01月20日 11点01分 5
你换url了?如果没换的话还是不能用,你看他那代码显示有,rainmeter就是没有啊,不同的浏览器获取到的网页代码是不一样的,另外如果你没改url的话(我就是觉得你这个皮肤的url不能用,不然不会数据不同步),你这里显示数据不对是之前能用时候的天气数据(未更新之前)
2020年01月21日 02点01分
level 1
weather.com停止了API,不光是rainmeter受影响,很对android手机的天气软件也一样
2020年01月21日 02点01分 6
1