It is currently September 29th, 2024, 9:30 am

Imdb DVD&Blu-Ray Releases

Get help with creating, editing & fixing problems with skins
User avatar
Mr. Spock
Posts: 46
Joined: August 5th, 2013, 6:07 pm
Location: The Netherlands

Imdb DVD&Blu-Ray Releases

Post by Mr. Spock »

Need a little help
I want to build a skin that reeds the IMD page
http://www.imdb.com/sections/dvd/
It also has a Rss page
http://rss.imdb.com/list/ls075513547/
Now i want to do it in such a way that when it's updated it also update the skin.
Where can i find the date and how to put it in a (?siU) so it change when the page is updated
Is it this line

Code: Select all

<script>(function(t){ (t.events = t.events || {})["csm_head_post_title"] = new Date().getTime(); })(IMDbTimer);</script>
or this one

Code: Select all

<h1 class="header">New to Own: Week of February 10, 2015</h1>
(don't believe this is it because it's just the header)
I like to do it from the page
http://www.imdb.com/sections/dvd/
So latter on i can also put the picture's of the movies with it

Thx for the help infront
Last edited by Mr. Spock on March 20th, 2015, 6:16 pm, edited 1 time in total.
User avatar
balala
Rainmeter Sage
Posts: 16602
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Imdb DVD&Blu-Ray Releases

Post by balala »

Mr. Spock wrote:It also has a Rss page
http://rss.imdb.com/list/ls075513547/
I recommand to use the RSS page.
Mr. Spock wrote:Now i want to do it in such a way that when it's updated it also update the skin.
Where can i find the date and how to put it in a (?siU) so it change when the page is updated
You could use the RainRegExp, a great tool for this kind of tasks.
A first RegExp option could be: RegExp=(?siU)<title>New to Own: Week of (.*)</title>.*<item>.*<pubDate>(.*)</pubDate>.*<title>(.*)</title>.*<link>(.*)</link>.*<description>(.*)</description>.*</item>, but this will parse just the first movie. For details see the WebParser plugin help.
User avatar
Mr. Spock
Posts: 46
Joined: August 5th, 2013, 6:07 pm
Location: The Netherlands

Re: Imdb DVD&Blu-Ray Releases

Post by Mr. Spock »

Thx for the help :welcome:
User avatar
revolt4peace
Posts: 83
Joined: February 3rd, 2015, 4:36 pm

Re: Imdb DVD&Blu-Ray Releases

Post by revolt4peace »

You're welcome! xD
-__--__-- Explodingcreeperssss --__--__-
Click Me! - My Algebra Solver for Rainmeter!
User avatar
Mr. Spock
Posts: 46
Joined: August 5th, 2013, 6:07 pm
Location: The Netherlands

Re: Imdb DVD&Blu-Ray Releases

Post by Mr. Spock »

Need a bit more help

Figured out with the RainregExp and help of balala how to pull the info from the Imdb rss site
Now from the title of the movie i want to make a clickable link

This is what i got so far
Author=Mr. Spock
Update=500
DynamicWindowSize=1

[Metadata]
Name=
Config=
Description=
Instructions=
Version=
Tags=
License=
Variant=
Preview=

[Variables]

[MeasureRSSParent]
Measure=Plugin
Plugin=WebParser.dll
UpdateRate=3600
URL="http://rss.imdb.com/list/ls075513547/"
RegExp=(?siU)<title>New to Own: Week of (.*)</title>.*<item>.*<title>(.*)</title>.*<link>(.*)</link>.*</item>
StringIndex=0
Debug=1

[MeasureRSSTitle]
Measure=Plugin
Plugin=WebParser.dll
UpdateRate=3600
URL=[MeasureRSSParent]
StringIndex=1

[MeasureRSSTitle1]
Measure=Plugin
Plugin=WebParser.dll
UpdateRate=3600
URL=[MeasureRSSParent]
StringIndex=2

[MeasureRSSTitle2]
Measure=Plugin
Plugin=WebParser.dll
UpdateRate=3600
URL=[MeasureRSSParent]
StringIndex=3

[MeterRSSTitle]
Meter=String
MeasureName=MeasureRSSTitle
FontSize=14
FontColor=255,255,255,255
StringStyle=Bold
AntiAlias=1
X=5
Y=5

[MeterRSSTitle1]
Meter=String
MeasureName=MeasureRSSTitle1
FontSize=14
FontColor=255,255,255,255
StringStyle=Bold
AntiAlias=1
X=5
Y=20
LeftMouseDownAction=[MeasureRSSTitle2]
so the movie title has to become the link

Thx infront for the help
User avatar
balala
Rainmeter Sage
Posts: 16602
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Imdb DVD&Blu-Ray Releases

Post by balala »

Mr. Spock wrote:so the movie title has to become the link
Instead of LeftMouseDownAction=[MeasureRSSTitle2] on the MeterRSSTitle1] section, try this: LeftMouseUpAction=["[MeasureRSSTitle2]"]. Note that I modified the LeftMouseDownAction to LeftMouseUpAction, because using LeftMouseDownAction you disable the skin dragging.
User avatar
FreeRaider
Posts: 826
Joined: November 20th, 2012, 11:58 pm

Re: Imdb DVD&Blu-Ray Releases

Post by FreeRaider »

Hello, try this

Code: Select all

[MeterRSSTitle1]
Meter=String
MeasureName=MeasureRSSTitle1
FontSize=14
FontColor=255,255,255,255
StringStyle=Bold
AntiAlias=1
X=5
Y=20
LeftMouseUpAction=["[MeasureRSSTitle2]"]
A tip: i suggest you use LeftMouseUpAction

EDIT: balala beat me :D
User avatar
balala
Rainmeter Sage
Posts: 16602
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Imdb DVD&Blu-Ray Releases

Post by balala »

FreeRaider wrote:EDIT: balala beat me :D
No, I didn't. But it seems we're thinking alike.
User avatar
Mr. Spock
Posts: 46
Joined: August 5th, 2013, 6:07 pm
Location: The Netherlands

Re: Imdb DVD&Blu-Ray Releases

Post by Mr. Spock »

THX FreeRaider & balala

LoL the lightbulb went on in my brains and i start to understand the RegExP so i start to get a little hardboned balala
Instead of using http://rss.imdb.com/list/ls075513547/
i use http://www.imdb.com/sections/dvd/

Now i got this far with RegExp

Code: Select all

(?siU)<title>(.*)</title>.*<h1 class="header">(.*)</h1>.*<img src="(.*)">.* <span class="year_type">(.*)</span>
Giving me

Code: Select all

1 => DVD & Blu-Ray
2 => New to Own: Week of February 17, 2015
3 => http://ia.media-imdb.com/images/M/MV5BODAzNDMxMzAxOV5BMl5BanBnXkFtZTgwMDMxMjA4MjE@._V1._SY209_CR0,0,140,209_.jpg" height="209" width="140" alt="Image of Birdman" class="zero-z-index
4 => (2014)
Yes even picture is downloaded and placed with it thx to FreeRaider (sonarr)
Author=Mr. Spock
Update=500
DynamicWindowSize=1

[Metadata]
Name=
Config=
Description=
Instructions=
Version=
Tags=
License=
Variant=
Preview=

[Variables]

[MeasureRSSParent]
Measure=Plugin
Plugin=WebParser.dll
UpdateRate=3600
URL="http://www.imdb.com/sections/dvd/"
RegExp=(?siU)<title>(.*)</title>.*<h1 class="header">(.*)</h1>.*<img src="(.*)">
StringIndex=0
Debug=1
UpdateRate=3600

[MeasureRSSTitle]
Measure=Plugin
Plugin=WebParser.dll
URL=[MeasureRSSParent]
StringIndex=1

[MeasureRSSTitle1]
Measure=Plugin
Plugin=WebParser.dll
URL=[MeasureRSSParent]
StringIndex=2

[MeasureRSSImg]
Measure=Plugin
Plugin=WebParser.dll
UpdateRate=3600
URL=[MeasureRSSParent]
StringIndex=3
Download=1

[MeterRSSTitle]
Meter=String
MeasureName=MeasureRSSTitle
FontSize=14
FontColor=255,255,255,255
StringStyle=Bold
AntiAlias=1
X=5
Y=5

[MeterRSSTitle1]
Meter=String
MeasureName=MeasureRSSTitle1
FontSize=14
FontColor=255,255,255,255
StringStyle=Bold
AntiAlias=1
X=5
Y=20
;LeftMouseUpAction=["[MeasureRSSLink]"]
;DynamicVariables=1

[MeterFlagImage]
Meter=Image
MeasureName=MeasureRSSImg
X=5
Y=35
DynamicVariables=1
(still dirty code just experimenting)

Now i want to learn something new
RegExpSubstitute=1
Substitute=".*/(.*).png":"\1"
I got this from the line from the Imdb page page

Code: Select all

<b><a    onclick="(new Image()).src='/rg/item-title/list/images/b.gif?link=%2Ftitle%2Ftt2562232%2F';"     href="/title/tt2562232/"    >Birdman</a>
    <span class="year_type">(2014)</span></b>
I want to try if it's possible to get the link out of it (href="/title/tt2562232/") so i can make the picture in my skin clickable and i want to get the title, Birdman in this case
I think i have to use a substitute for that but is it so simple that i use

Code: Select all

Substitute=onclick="(new Image()).src='/rg/item-title/list/images/b.gif?link=%2Ftitle%2Ftt2562232%2F';"
I believe not because with the following movie it wil be a other onclick link so is there a other way
I also want to get from this line

Code: Select all

<div class="rating rating-list" data-auth="BCYj2B8L4ySttIOu1l3Z4zUJstCf3_9k-VyHvIQf11A2D0rB1N_UOOdfr4bkDSq1wqGleJAqcOIq_ULXhRZyJ-R8o5Gc79m00RqEa52pLX9r_b3c2bCem66KhWGlxKoh3Red" id="tt2562232|imdb|8.1|8.1|list" data-ga-identifier="list"
 title="Users rated this 8.1/10 (150,222 votes) - click stars to rate">
This little part "Users rated this 8.1/10 (150,222 votes)"
How to that with Substitute so i can also use it for the other movies on this page

Yes i know a noob but at least i'm learning 8-)

Thx for any help
User avatar
FreeRaider
Posts: 826
Joined: November 20th, 2012, 11:58 pm

Re: Imdb DVD&Blu-Ray Releases

Post by FreeRaider »

Substitute replaces some or all of a string value returned by a measure with another string.
In your case I think that you can not use it. You can directly capture the information through a regular expression.

Example: for this

Code: Select all

<b><a    onclick="(new Image()).src='/rg/item-title/list/images/b.gif?link=%2Ftitle%2Ftt2562232%2F';"     href="/title/tt2562232/"    >Birdman</a>
    <span class="year_type">(2014)</span></b>
use

Code: Select all

(?siU)<a.*;"\s\s\s\s\s(.*)\s\s\s\s>(.*)</a>
that it returns
  • 01=> href="/title/tt2562232/"
    02=> Birdman
You can try to substitute removing thehref="..." from the first capture using

Code: Select all

"href="(.*)":"\1"
and you have /title/tt2562232/, but i suggest you to use directly the regular expression (use

Code: Select all

(?siU)href="(.*)".*>(.*)</a>
).