Probleem met moviemeter.nl

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.
Post Reply
wvd
Posts: 96
Joined: 2006-08-02 22:21:20
Location: Nederland

Probleem met moviemeter.nl

Post by wvd »

Hallo ls,

Helaas is er wat op de site van Moviemeter wat veranderd en gaat laden van landen met het script van moviemeter niet meer goed als er meerdere landen zijn.
Het lukt me niet om dit goed te krijgen omdat ik html niet goed ken. :??:

Hieronder het stukje waar het volgens mij fout gaat:


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

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


Hopelijk wil iemand dit voor mij (en anderen) oplossen.

Alvast hartelijk bedankt :grinking:

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

Post by antp »

Hi,

My Dutch is bad so I'll reply in English (I hope you understand it).

If I understood correctly your message, you submit a change to the script to fix a problem when importing country info ?
Thanks for that :)
Just one comment:
you replaced

Code: Select all

  if (GetOption('AllCountries') = 0) and (Pos(' / ', Value) > 0)  then
    Value := TextBefore(Value, ' / ', '');
by

Code: Select all

  if (GetOption('AllCountries') = 0) and (Pos(' / ', Value) > 0) then
    Value := TextBefore(Value, '<br />', ''); 
but I guess it should be

Code: Select all

  if (GetOption('AllCountries') = 0) and (Pos('<br />', Value) > 0) then
    Value := TextBefore(Value, '<br />', ''); 
Do you have an example of movie with multiple countries to test that?
wvd
Posts: 96
Joined: 2006-08-02 22:21:20
Location: Nederland

Post by wvd »

I'm sorry for resonpding so late, but many thanks for solving the problem, this works perfect.

A movie with more countries is for example 'Surviving with Wolves'

My knowing of html is very little, so again thank you for solving the problem :grinking: :grinking:
greetings
Wim
antp
Site Admin
Posts: 9636
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

That change did not seem to fix it (or they changed something again on the site), but I made the right one to make the country import work again.
Script has been uploaded with other new scripts.
wvd
Posts: 96
Joined: 2006-08-02 22:21:20
Location: Nederland

Post by wvd »

Hello Antoine,

I have download the new script but now it doesn't works anymore here.
Now only one land is loaded.

So I changed it back to this:

if (GetOption('AllCountries') = 0) and (Pos('<br />', Value) > 0) then
Value := TextBefore(Value, '<br />', '');

and then it works well

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

Post by antp »

:??: it works fine for me
You have to set the option AllCountries to 1 of course to get more than 1 country.
If you change by replacing " / " by "<br />" it will always get all countries, which is not right if the option is set to 0.
wvd
Posts: 96
Joined: 2006-08-02 22:21:20
Location: Nederland

Post by wvd »

Hello Antoine,

Proberbly I'm doing something wrong, but when I use the downloaded script from 3 july with the following option for country:

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

Then there will be just one country imported from the movie "Surviving with wolves"

And when I use your last update from the reply above:

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

All countries will be imported.

As I said before my knowing of html is very very little but do you mean that I have to change it to this:

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

Then it also get more countries

Thanks for replying

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

Post by antp »

No, you have to change the option in the script window, in the options available on the right of the scripts list. These are changes that users can do without having to edit script code.
wvd
Posts: 96
Joined: 2006-08-02 22:21:20
Location: Nederland

Post by wvd »

Hello Antoine,

Thank you, I found the option. It's very simple if you know it.
Thanks for explaining.

:grinking:
folkbear
Posts: 12
Joined: 2006-05-12 14:48:18
Location: Belgium - Gullegem
Contact:

tried all solution handed but didn't work

Post by folkbear »

Hi,

I just tried the solution in the forum, updated the script, tried about everything but nothing seems to work. Either it changed once again or the solution didn't work, don't know but I can't seem to fetch the country... any solutions? I use the latest script available today.
antp
Site Admin
Posts: 9636
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

For me the current version (2.7.5) works... can you give an example of movie title which has a country on the site and which is not imported by that script?
folkbear
Posts: 12
Joined: 2006-05-12 14:48:18
Location: Belgium - Gullegem
Contact:

Post by folkbear »

well I tried over 300 titles now, and none seem to work : Critters, The scorpion King, Sometimes they come back etc...
antp
Site Admin
Posts: 9636
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

Post Reply