It is currently November 18th, 2018, 11:40 pm

WebParser Help

Help with creating, editing & fixing problems with skins
Nickcz
Posts: 9
Joined: January 21st, 2017, 10:27 pm

WebParser Help

Nickcz » November 19th, 2017, 7:32 pm

Hi, I'm trying to make a piece of code but its my first time using a webparser hope someone can tell me what I'm doing wrong

Code: Select all

[MeasureSite]
Measure=Plugin
Plugin=WebParser
URL=https://steamdb.info/search/?a=app&q=FINAL+FANTASY+X%2FX-2+HD+Remaster
RegExp=(?siU)<tr class="app" data-appid="(.*)">.*
UpdateRate=800

[MeasureID]
Measure=Plugin
Plugin=WebParser
URL=[MeasureSite]
StringIndex=1

[MeterIDLabel]
Meter=String
X=160
Y=5
W=300
H=15
FontSize=11
FontColor=255,225,181,255
SolidColor=47,47,47,255
Padding=5,5,5,5
FontWeight=700
StringAlign=Center
AntiAlias=1
Text=ID Number

[MeterID]
Meter=String
MeasureName=MeasureID
X=160
Y=3R
W=300
H=15
FontSize=11
FontColor=255,225,181,255
SolidColor=47,47,47,255
Padding=5,5,5,5
FontWeight=700
StringAlign=Center
AntiAlias=1
Firstly I need the webparser to look and grab the app id number, in this case it would be 359870 but I'm not sure what I've done wrong as it doesn't appear to grab anything

Secondary I would like to put a variable inside the url that would be changing the destination meaning that the app id number would be different, will this be a problem later?

Many Thanks to anyone who can help
User avatar
FreeRaider
Posts: 752
Joined: November 20th, 2012, 11:58 pm

Re: WebParser Help

FreeRaider » November 19th, 2017, 10:10 pm

I don't know why that site is ungrabbable.
I have another solution:

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1

[Metadata]
Name=Search Steam
Author=FreeRaider
Information=
License=CC BY-NC-SA 3.0
Version=

[Variables]
searchText=call of duty modern 3

[MeasureSite]
Measure=Plugin
Plugin=WebParser
URL=http://store.steampowered.com/search/?term=#searchText#
RegExp=(?siU).*<!-- List Items -->.*<a href=.*data-ds-appid="(.*)".*<span class="title">(.*)</span>.*
UpdateRate=-1

[MeasureID]
Measure=Plugin
Plugin=WebParser
URL=[MeasureSite]
StringIndex=1

[MeasureAppName]
Measure=Plugin
Plugin=WebParser
URL=[MeasureSite]
StringIndex=2

[MeterIDLabel]
Meter=String
X=160
Y=5
W=300
H=15
FontSize=11
FontColor=255,225,181,255
SolidColor=47,47,47,255
Padding=5,5,5,5
FontWeight=700
StringAlign=Center
AntiAlias=1
Text=ID Number

[MeterID]
Meter=String
MeasureName=MeasureID
X=160
Y=3R
W=300
H=15
FontSize=11
FontColor=255,225,181,255
SolidColor=47,47,47,255
Padding=5,5,5,5
FontWeight=700
StringAlign=Center
AntiAlias=1

[MeterNameApp]
Meter=String
MeasureName=MeasureAppName
X=160
Y=3R
W=300
H=15
FontSize=11
FontColor=255,225,181,255
SolidColor=47,47,47,255
Padding=5,5,5,5
FontWeight=700
StringAlign=Center
AntiAlias=1
It uses store.steampowered.com as search engine and for security I also add the capture of the app's name.

I hope this helps you
Nickcz
Posts: 9
Joined: January 21st, 2017, 10:27 pm

Re: WebParser Help

Nickcz » November 20th, 2017, 6:13 pm

That works, thank you for your help :D
User avatar
FreeRaider
Posts: 752
Joined: November 20th, 2012, 11:58 pm

Re: WebParser Help

FreeRaider » November 20th, 2017, 9:33 pm

Glad to help.