It is currently November 15th, 2018, 7:20 am

Webparser and cookies.

General topics related to Rainmeter.
User avatar
kyriakos876
Posts: 814
Joined: January 30th, 2017, 2:01 am
Location: Greece

Webparser and cookies.

kyriakos876 » June 18th, 2018, 10:27 pm

Hello, I know that webparser doesn't support cookies thus making it impossible to get stuff off of a page that requires log-in, but I was wondering if there's a plugin that can access the information through the browser that is able to handle cookies. I'm especially interested in Facebook messages. If anyone has any information on that please link me to it. :)
User avatar
SilverAzide
Posts: 492
Joined: March 23rd, 2015, 5:26 pm

Re: Webparser and cookies.

SilverAzide » June 19th, 2018, 10:07 pm

Since no one else has chimed in with a suggestion, I'll tell you one way that will work. It's not trivial, but it will work. All you need is the RunCommand plugin and a copy of cURL. You can get cURL here: https://curl.haxx.se/ (or here: https://curl.haxx.se/download.html).

If you are not familiar with cURL, it is basically a command-line interface that does everything WebParser can do and a ton more. It supports all the HTTP verbs (including POST), you can output to a file or the screen (like WebParser), and it handles cookies, authentication, and etc.

Code: Select all

[MeasureUsingWebParser]
Measure=WebParser
Url=https://wxdata.weather.com/wxdata/weather/local/USNY0996:1:US?cc=*&unit=m&dayf=1
RegExp=(?siU)^(.*)$
UpdateRate=900

[MeasureUsingRunCommand]
Measure=Plugin
Plugin=RunCommand
Parameter=curl "https://wxdata.weather.com/wxdata/weather/local/USNY0996:1:US?cc=*&unit=m&dayf=1"
OutputType=ANSI
State=Hide
Timeout=5000
UpdateDivider=900
The above measures should be virtually identical (I didn't try it), although you might need to handle child measures a little differently if you need them.
DeviantArt Gadgets More...
User avatar
kyriakos876
Posts: 814
Joined: January 30th, 2017, 2:01 am
Location: Greece

Re: Webparser and cookies.

kyriakos876 » June 24th, 2018, 4:26 pm

sounds doable, I'll more into it when I got the time. Thanks for the suggestion!!
Anchoughboad
Posts: 1
Joined: July 18th, 2018, 3:15 pm

Re: Webparser and cookies.

Anchoughboad » July 18th, 2018, 3:19 pm

kyriakos876 wrote:sounds doable, I'll more into it when I got the time. Thanks for the suggestion!!
have you found some time? really interested if you can update!
been having same question as you.
thanks for trying to answer by the way..
User avatar
kyriakos876
Posts: 814
Joined: January 30th, 2017, 2:01 am
Location: Greece

Re: Webparser and cookies.

kyriakos876 » July 21st, 2018, 11:48 am

Anchoughboad wrote:have you found some time? really interested if you can update!
been having same question as you.
thanks for trying to answer by the way..
I never managed to reach to satisfying level that can be useful... I'm sorry.