Moviemeter.nl problem

If you made a script you can offer it to the others here, or ask help to improve it. You can also report here bugs & problems with existing scripts.
wvd
Posts: 96
Joined: 2006-08-02 22:21:20
Location: Nederland

Post by wvd »

Hello Raoul,


The moviemeter script should be changed a little bit.
This is what you should change:

False:
// Rating
Value := TextAfter(TextBetween(PageText, '<span itemprop="ratingValue"', '<'), '>');


Good:
// Rating
Value := TextAfter(TextBetween(PageText, '<span itemprop="average"', '<'), '>');


By the way, I use the "bestandsgrootte" Alias "File Size" field for something else :D :D .
I use it to display the age picture when I print a list of movies


Greetings,
Wim
Raoul_Volfoni
Posts: 863
Joined: 2006-08-31 23:58:18

Post by Raoul_Volfoni »

Hello wvd,
wvd wrote:The moviemeter script should be changed a little bit.
This is what you should change:
// Rating
Value := TextAfter(TextBetween(PageText, '<span itemprop="average"', '<'), '>');
Thanks for that, i did not see the rating part was not working.
wvd wrote:By the way, I use the "bestandsgrootte" Alias "File Size" field for something else :D :D .
I use it to display the age picture when I print a list of movies
But you are not Stemir !! :hihi:
So, are you interessed to get the link ? if yes, where do you you wont to store it ? I'll add a another possibility in the IMDB_Link option.
He ... wait a minute ... you have already fix the script in the past ... so i give you back the baby !! :)
I was just trying to give a little help, but i have already enough to manage with the french scripts ... however if you have no time, let me know.
wvd
Posts: 96
Joined: 2006-08-02 22:21:20
Location: Nederland

Post by wvd »

Hello Raoul,

I use the script often, so if it's changed I notice it immediately.
This very simple thing I can fix, but I don't have the knowledge of HTML. :(
My help will be very little.
So sure I try to fix it always first myself, and if it fails I put the question here.

I can't find where I can upload the script.
Or should I mail it to you? (That will be tonight)


No I'm not Stemir. :hihi:
Thank you, but I don't use the IMDB in Ant Movie Catalog

greetings,
Wim from Nederland
Raoul_Volfoni
Posts: 863
Joined: 2006-08-31 23:58:18

Post by Raoul_Volfoni »

wvd wrote:I use the script often, so if it's changed I notice it immediately.
This very simple thing I can fix, but I don't have the knowledge of HTML. sad
My help will be very little.
So sure I try to fix it always first myself, and if it fails I put the question here.

Any help, even little, is most welcome ... :) ... and personally i learned a lot and improved my knowledge (except in english ;)) by fixing scripts, so keep going.
I can't find where I can upload the script.
Or should I mail it to you? (That will be tonight)
No, not to me ... except this time, if you have fixed more than the rating part.
When i fix a script, i send it to antp and then he put it on his server. So next time you fix the script, you can send it directly to Antoine.
wvd wrote:Thank you, but I don't use the IMDB in Ant Movie Catalog
Ok, but if you have any request, don't hesitate, i'd see what i can do.
wvd
Posts: 96
Joined: 2006-08-02 22:21:20
Location: Nederland

Post by wvd »

Hi Raoul,

No I didn't have to do more than just replaced the word "average".

Thanks for the help you offer, I keep that in mind. :grinking:

Greetings, Wim
antp
Site Admin
Posts: 9629
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

@Raoul, should I include your changes in the official script, in the end?
Raoul_Volfoni
Posts: 863
Joined: 2006-08-31 23:58:18

Post by Raoul_Volfoni »

Hi antp,
I'm still waiting a confirmation from stefmir,
but the new option is disabled by default and
should not interfere with normal use, so you can include it. But if you
don't have the time to do it, I could provide you a
version tonight or tomorrow.
Raoul_Volfoni
Posts: 863
Joined: 2006-08-31 23:58:18

Update of Moviemeter.nl script (v 2.8.07)

Post by Raoul_Volfoni »

Hi,

The Moviemeter.nl script (v 2.8.07) is now available on the antp server.
You can update manually or use the [Update Scripts] script.

Changelog :


- Fix a problem with the rating (thanks wvd)(and already fix by antp in 2.8.06 version ;))
- Add an option called IMDB Link with three possibilities :
0 -> Do not store IMDB Link
1 -> Store IMDB Link in FileSize field
2 -> Store IMDB Link in Custom field (You need at least 4.0.0 version of AMC and you have to create a custom field with "IMDBLink" for Tag and "URL" for Type)
The option is set by default to 0.
wvd
Posts: 96
Joined: 2006-08-02 22:21:20
Location: Nederland

Post by wvd »

Hello Raoul or Antoine,

Sorry, but there is again something changed on Moviemeter.
And I can't fix it :(
The Country field stay's empty if you load a film.

Greetings, Wim
Raoul_Volfoni
Posts: 863
Joined: 2006-08-31 23:58:18

Post by Raoul_Volfoni »

Hello wvd,

I have sent an update to antoine. He will put it on his server, as soon he will read my message. Meanwhile, you can fix the script by yourself. There are two lines to correct. These lines are just before the Country part of the script. In fact i don't understand why these lines are not include in the country part ... I would change it next time. Anyway ... line 38 become :

Code: Select all

  Value := TextBetween(PageText, '<div id="film_info"', '<br /><span itemprop="genre">');
and line 40 become :

Code: Select all

  Value := TextAfter(Value, '<div id="rating_icons">');
I tested on a few films, I hope that it works with all other.
wvd
Posts: 96
Joined: 2006-08-02 22:21:20
Location: Nederland

Post by wvd »

Hello Raoul,

Thanks for the reply.

Some movies it goes good but it doesn't works good every time.

For example the movie:
Memoirs of an invisible man

Here it won't load the country "Frankrijk / Verenigde Staten" and also now the category gives just 1 result "Sciencefiction" instead of "Komedie / Sciencefiction"

Greetings Wim
Raoul_Volfoni
Posts: 863
Joined: 2006-08-31 23:58:18

Post by Raoul_Volfoni »

wvd wrote:Some movies it goes good but it doesn't works good every time.

For example the movie:
Memoirs of an invisible man
Here it won't load the country "Frankrijk / Verenigde Staten"
Ok ... :/ ... it's because there is no rating icons for this movie ...
wvd wrote:and also now the category gives just 1 result "Sciencefiction" instead of "Komedie / Sciencefiction"
Sorry about that, it is a consequence of the line 38 change.


Would you do a test for me, before i send an another update to Antoine ?
Change all lines between line 38 to 57.
From this :

Code: Select all

  Value := TextBetween(PageText, '<div id="film_info"', '<br /><span itemprop="genre">');
  Line := RemainingText;
  Value := TextAfter(Value, '<div id="rating_icons">');
  //Value := TextAfter(Value, '</div>');

  HTMLRemoveTags(Value);
Value := Trim(Value);

  // Country
  if (GetOption('AllCountries') = 0) and (Pos(' / ', Value) > 0)  then
    Value := TextBefore(Value, ' / ', '');
 HTMLDecode(Value);
  SetField(fieldCountry, Value);

  // Category
  Value := TextBetween(Line, '<span itemprop="genre">', '</span><br />');
  Line := RemainingText;
  HTMLRemoveTags(Value);
  HTMLDecode(Value);
  SetField(fieldCategory, Value);
To this :

Code: Select all

  // Country
  Value := TextBetween(PageText, '<div id="film_info"', '<br /><span itemprop=');
  Line := RemainingText;
  Value := TextAfter(Value, 'Tweet</a>');
  Value := TextAfter(Value, '</script>');
  HTMLRemoveTags(Value);
  Value := Trim(Value);
  if (GetOption('AllCountries') = 0) and (Pos(' / ', Value) > 0)  then
  Value := TextBefore(Value, ' / ', '');
  HTMLDecode(Value);
  SetField(fieldCountry, Value);

  // Category
  Value := TextBetween(Line, '"genre">', '</span><br />');
  Line := RemainingText;
  HTMLRemoveTags(Value);
  HTMLDecode(Value);
  SetField(fieldCategory, Value);
And tell me if it's better ... ;)
wvd
Posts: 96
Joined: 2006-08-02 22:21:20
Location: Nederland

Post by wvd »

Raoul,

Your awesome :grinking: :grinking:
it works great again!!

Thank you very much :grinking:

greetings, Wim
Raoul_Volfoni
Posts: 863
Joined: 2006-08-31 23:58:18

Update of Moviemeter.nl script (v 2.8.08)

Post by Raoul_Volfoni »

Hi,

The Moviemeter.nl script (v 2.8.08) is now available on the antp server.
You can update manually or use the [Update Scripts] script.

Changelog :

- Fix a problem with country.
StefMir
Posts: 55
Joined: 2011-05-31 19:07:43

Post by StefMir »

thanks to all

but I get this message when I want to execute the script:

Image
Raoul_Volfoni
Posts: 863
Joined: 2006-08-31 23:58:18

Post by Raoul_Volfoni »

Hello,

Strange, you may have changed something ... Because, as it was already the case before, The "Moviemeter.nl" script need the "StringUtils1.pas" file to work.
You can find this file here : http://update.antp.be/amc/scripts/
You have to put this file in the Scripts's directory of AMC.
Or you can use the [ UPDATE SCRIPTS ] script to do that. The "StringUtils1.pas" file will might appear in the additional scripts part of the list.
StefMir
Posts: 55
Joined: 2011-05-31 19:07:43

Post by StefMir »

Raoul_Volfoni wrote:Hello,

Strange, you may have changed something ... Because, as it was already the case before, The "Moviemeter.nl" script need the "StringUtils1.pas" file to work.
You can find this file here : http://update.antp.be/amc/scripts/
You have to put this file in the Scripts's directory of AMC.
Or you can use the [ UPDATE SCRIPTS ] script to do that. The "StringUtils1.pas" file will might appear in the additional scripts part of the list.
uninstalled and installed AMC and all is OK now. Thank you.
StefMir
Posts: 55
Joined: 2011-05-31 19:07:43

Post by StefMir »

Tested and it looks good.

Only problem is, the script has problems with importing some fields when there is a "(" or/and and ")" in the title, examples:

http://www.moviemeter.nl/film/59745

http://www.moviemeter.nl/film/62440

maybe there is something to do about that too to get the script 100% working?

t.i.a.
Raoul_Volfoni
Posts: 863
Joined: 2006-08-31 23:58:18

Post by Raoul_Volfoni »

StefMir wrote:uninstalled and installed AMC and all is OK now. Thank you.
drastic solution ... ;) ... but why not ... :hihi:
StefMir wrote:Only problem is, the script has problems with importing some fields when there is a "(" or/and and ")" in the title
When you say some fields, it is just the Original Title and the Year ? Right ?
If so, then I know where the problem is.
StefMir
Posts: 55
Joined: 2011-05-31 19:07:43

Post by StefMir »

Raoul_Volfoni wrote:
StefMir wrote:uninstalled and installed AMC and all is OK now. Thank you.
drastic solution ... ;) ... but why not ... :hihi:
StefMir wrote:Only problem is, the script has problems with importing some fields when there is a "(" or/and and ")" in the title
When you say some fields, it is just the Original Title and the Year ? Right ?
If so, then I know where the problem is.
yes, only those 2 fields ...

can you fix that? Would be great!
Post Reply