It is currently March 29th, 2024, 1:49 pm

Help me to paste authorization in the URL for parsing

Get help with creating, editing & fixing problems with skins
User avatar
ZerOverdriver
Posts: 29
Joined: February 13th, 2017, 8:57 pm

Help me to paste authorization in the URL for parsing

Post by ZerOverdriver »

Hi, friends!
Please help to understand with skin simple Yandex mail.
I found a little bit few skins, but they do not work.

The link on the mail looks like this:
https://mail.yandex.ru/uXXXX/?dpda=yes&uid=XXXXXXXXXXlogin=zeroverdriver75#inbox
(Of course it is clear that where XXXX - it's numbers)

I understand that zeroverdriver75 is my username, which must be replaced in the code for URL on the link to the user login, but where to paste the link to the password not clear to me.

But there is another problem for me:
In code this page is a short link to another page from which it is necessary to take data.
Here is the code snippet:
<div style='position:absolute;left:-9999em;top:-9999em;' role='alert'>
<a href="/u2709/go2lite?clck=1">


Fully this link looks like this:
https://mail.yandex.ru/lite/inbox

Its code is part of a string from which I need only one value.
It looks like this:
<span class="b-folders__folder b-folders__folder_unread b-folders__folder_current"><span class="b-folders__folder__num" mode="presentation" aria-hidden="true">XX</span>

Of course I made this RegExp:

Code: Select all

RegExp="(?siU)<span class="b-folders__folder b-folders__folder_unread b-folders__folder_current"><span class="b-folders__folder__num" mode="presentation" aria-hidden="true">(.*)</span>"
Here is part of code of my skin I can't get to work:

Code: Select all

[Rainmeter]
Author=ZerOverdriver
Update=1000
AccurateText=1

URLYM=https://mail.yandex.ru?&login=#YandexLogin#&passwd=#YandexPassword#/#inbox
URLYM2=https://mail.yandex.ru?&login=#YandexLogin#&passwd=#YandexPassword#/lite/inbox
;?&login=#YandexLogin#&passwd=#YandexPassword#


[Measure_YmBase]
Measure=Plugin
Plugin=WebParser
URL=#URLYM#
RegExp="^(?siU)$"
UpdateRate=360
StringIndex=1
FinishAction=[!UpdateMeasure Measure_YmNum]

[Measure_YmNum]
Measure=Plugin
Plugin=WebParser
Url=#URLYM2#
RegExp="(?siU)<span class="b-folders__folder b-folders__folder_unread b-folders__folder_current"><span class="b-folders__folder__num" mode="presentation" aria-hidden="true">(.*)</span>"
UpdateRate=360
StringIndex=1
Substitute="":"0"
ErrorString=?

[Meters123]
...blablabla

[Meter_YmN]
Meter=STRING
MeasureName=Measure_YmNum
MeterStyle=style0
X=#size90#
Y=R
FontSize=(#size6#*3)
FontColor=#Color2#,#Alpha1#
StringAlign=LEFT
Text="#letters#: %1"
DynamicVariables=1

If you will help to realize that I might be able to bring at least only one value, then I can do a complete skin Yandex mail.
For my work now, it is sufficient only that.
Tell me please the right decision!
Last edited by ZerOverdriver on November 13th, 2017, 3:29 pm, edited 4 times in total.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5384
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Help me to paste authorization in the URL for parsing

Post by eclectic-tech »

I notice some strange code in your first webparser RegExp.

You have RegExp="^(?siU)$"... I think you meant RegExp="(?siU)^(.*)$" to capture everything to be used in your second webparser. Hopefully that change will get you the data...

I do not use Yandex mail, so I am not sure where the passcode would be placed. :confused:
User avatar
ZerOverdriver
Posts: 29
Joined: February 13th, 2017, 8:57 pm

Re: Help me to paste authorization in the URL for parsing

Post by ZerOverdriver »

eclectic-tech wrote:I notice some strange code in your first webparser RegExp.

You have RegExp="^(?siU)$"... I think you meant RegExp="(?siU)^(.*)$" to capture everything to be used in your second webparser. Hopefully that change will get you the data...
Ha-ha-aha-hhaaa :rofl: - I was a fool. Really it was a stupid mistake.
Thank you already for this fix. :bow:
I need may still have to fix how to enter in an internal link in the code from one mesure. :confused:

Here shows the information about the internal link to an image, but this method does not suit me, because there is no option of login on this link to parse code that refers to it.
https://docs.rainmeter.net/tips/webparser-relative-paths/

Tried this, but doesn't work:
Url=[Measure_YmBase]\#URLYM2#
Last edited by ZerOverdriver on November 13th, 2017, 3:31 pm, edited 1 time in total.
User avatar
ZerOverdriver
Posts: 29
Joined: February 13th, 2017, 8:57 pm

Re: Help me to paste authorization in the URL for parsing

Post by ZerOverdriver »

Yes - it's work! Again, I was not careful. First mesure was not needed.
Last edited by ZerOverdriver on November 13th, 2017, 10:52 pm, edited 1 time in total.
User avatar
ZerOverdriver
Posts: 29
Joined: February 13th, 2017, 8:57 pm

Re: Help me to paste authorization in the URL for parsing

Post by ZerOverdriver »

dvo wrote:

Code: Select all

Url=[Measure_YmBase]\#URLYM2#
should be

Code: Select all

Url=[Measure_YmBase]/#URLYM2#
;-)

normaly

Code: Select all

Url=#URLYM2#
should work .... measures in a URL ain't a option .... :x
You were right! Everything is much easier - I entered the wrong password, this is not the login code.
Skin a lot easier , without first mesure works.
Now I can get all the information and make a complete skin .
Thank you so much. :bow: :great: :thumbup: