Author Topic: Filmweb.pl  (Read 17117 times)

0 Members and 1 Guest are viewing this topic.

sinus

  • Guest
Filmweb.pl
« on: January 11, 2011, 09:30:11 pm »
Hi,
This is my first post on this forum. :)
I would like to introduce my script to read movie info from polish service http://www.filmweb.pl
You can download it from http://www.tinyurl.pl?3b1vk3Fz (newest version is attached to this post)
Thank you from every feedback. It is first release therefore it will be refactored soon, but it's working fine for me.

best regards,
sinus

[attachment deleted by admin]
« Last Edit: January 18, 2011, 09:41:13 pm by sinus »

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2667
    • View Profile
Re: Filmweb.pl
« Reply #1 on: January 11, 2011, 10:29:36 pm »
Welcome, sinus

Very nice work, for me works fine otherwise, but drawbacks such as the movie Czworo z Teksasu (4 For Texas) no players, music (in your language;pozostałe informacje).Even at rest the same.I wonder why they can not see.
« Last Edit: January 11, 2011, 10:31:15 pm by Ivek23 »
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


sinus

  • Guest
Re: Filmweb.pl
« Reply #2 on: January 12, 2011, 12:06:45 am »
Thanks, I uploaded second version which read also: aka, persons, composers, directors & writers.

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2667
    • View Profile
Re: Filmweb.pl
« Reply #3 on: January 12, 2011, 07:08:10 am »
Thanks, I uploaded second version which read also: aka, persons, composers, directors & writers.

Thank you, right here to upload the script, they can do the upload in your post under Additional Options > Attach:
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2667
    • View Profile
Re: Filmweb.pl
« Reply #4 on: January 12, 2011, 07:17:33 am »
The duration of the film shows is not correct.

For example:

in your case       00:02:04

proper      02:04:00

[attachment deleted by admin]
« Last Edit: January 12, 2011, 07:38:29 am by Ivek23 »
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


sinus

  • Guest
Re: Filmweb.pl
« Reply #5 on: January 12, 2011, 09:05:19 am »
Corrected and file attached to the first post :)

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2667
    • View Profile
Re: Filmweb.pl
« Reply #6 on: January 12, 2011, 10:02:40 am »
Corrected and file attached to the first post :)

Thanks

The duration of the film shows is not correct.

For example:

in your case       00:02:04

proper      02:04:00

Now it 's okay.

Can you tell me, how to add such rating

Code: [Select]
//orating
i := Pos('<span class="average">', HTML);
if i>0 then
begin
i := PosFrom('>', HTML, i);
j := PosFrom('<', HTML, i);
lStr := Copy(HTML, i+1, j-i-1);
AddFieldValueXML('orating', lStr);
Log(lStr);
AddFieldValueXML('orname', 'Filmweb.pl');
end;


or other added to the custom field.
« Last Edit: January 12, 2011, 10:22:38 am by Ivek23 »
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


sinus

  • Guest
Re: Filmweb.pl
« Reply #7 on: January 12, 2011, 11:24:02 am »
If I understand correctly your intention, for example: you use another script for get movies info and from my you want only get rating? I upload new version near midnight.

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2667
    • View Profile
Re: Filmweb.pl
« Reply #8 on: January 12, 2011, 02:05:37 pm »
If I understand correctly your intention, for example: you use another script for get movies info and from my you want only get rating? I upload new version near midnight.

Sorry if we did not properly understand,script is fine, my only interest this code

Code: [Select]
//orating
i := Pos('<span class="average">', HTML);
if i>0 then
begin
i := PosFrom('>', HTML, i);
j := PosFrom('<', HTML, i);
lStr := Copy(HTML, i+1, j-i-1);
AddFieldValueXML('orating', lStr);
Log(lStr);
AddFieldValueXML('orname', 'Filmweb.pl');
end;



how the rating or anything else added to the custom field.
If you will upload the new script should be added separately (that other users can still download this script, which is the first post) and somehow marked or written in a post that will be known to have added a custom field.

Thank you for your understanding.

BTW:  About something like it in AllMovie+ script .
« Last Edit: January 12, 2011, 08:01:38 pm by Ivek23 »
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


sinus

  • Guest
Re: Filmweb.pl
« Reply #9 on: January 12, 2011, 10:58:16 pm »
I uploaded new version. Rating is also added as custom field but maybe its useless if someone will use my script as the main script to gather movies info.

Code: [Select]
//orating
i := Pos('<span class="average">', HTML);
if i>0 then
begin
i := PosFrom('>', HTML, i);
j := PosFrom('<', HTML, i);
lStr := Copy(HTML, i+1, j-i-1);
lStr := StringReplace(lStr, ',', '.', true, true, false);
Log('Rating: '+lStr);
AddFieldValueXML('orating', lStr);
AddFieldValueXML('orname', 'Filmweb.pl');
AddCustomFieldValueByName(cCF_Rating, lStr);
end;

As you see, to custom fields you must use AddCustomFieldValueByName(fieldName, value) where fieldName is matched to field name in "Tools -> Preferences -> Movies -> Custom fields".

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2667
    • View Profile
Re: Filmweb.pl
« Reply #10 on: January 13, 2011, 07:57:27 am »
Thank you for this new script.

Quote
Code: [Select]
//orating
i := Pos('<span class="average">', HTML);
if i>0 then
begin
i := PosFrom('>', HTML, i);
j := PosFrom('<', HTML, i);
lStr := Copy(HTML, i+1, j-i-1);
lStr := StringReplace(lStr, ',', '.', true, true, false);
Log('Rating: '+lStr);
AddFieldValueXML('orating', lStr);
AddFieldValueXML('orname', 'Filmweb.pl');
AddCustomFieldValueByName(cCF_Rating, lStr);
end;

As you see, to custom fields you must use AddCustomFieldValueByName(fieldName, value) where fieldName is matched to field name in "Tools -> Preferences -> Movies -> Custom fields".

I know for this AddCustomFieldValueByName but I did not know how to do this (cCF_Rating, lStr).

I removed this filmweb -no custom fields script and this quote and text is no longer valid quote and text.

[
Quote
Rating is also added as custom field but maybe its useless if someone will use my script as the main script to gather movies info.

If you allow I upload (I have already filmweb -no custom fields) the previous version of the script(luckily I saved it) without the custom fields for those users which might be using your script
Quote
as the main script to gather movies info

under this post, but if you do not allow to publish, I will remove it.You can add it to your upload.
Thanks for the reply
.]                                                                                                                                                
« Last Edit: January 13, 2011, 11:01:49 am by Ivek23 »
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2667
    • View Profile
Re: Filmweb.pl
« Reply #11 on: January 13, 2011, 11:30:50 am »
Explanation for removal of the previous post:

This script also works the same as the previous script, so I removed the previous script.
This script works, however, also for all those that it can be used
Quote
maybe its useless if someone will use my script as the main script to gather movies info.

Quote
As you see, to custom fields you must use AddCustomFieldValueByName(fieldName, value) where fieldName is matched to field name in "Tools -> Preferences -> Movies -> Custom fields".
Rating does not work only it is spelled correctly custom field(like here
Code: [Select]
//CUSTOM FIELDS
cCF_Votes = 'Filmweb.pl votes'; //type: number
cCF_Rating = 'Filmweb.pl rating'; //type: rating
) for Rating custom field (tested, works for me).
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


sinus

  • Guest
Re: Filmweb.pl
« Reply #12 on: January 13, 2011, 09:01:57 pm »
Aaaaaaaaaaaaa :) now i understand. Next time try to paste error message from log.

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2667
    • View Profile
Re: Filmweb.pl
« Reply #13 on: January 14, 2011, 12:22:55 pm »
I must admit that is a great movie data base (basic to know). In my case I have in PVD database currently includes around 560 movies from this we can not find any information for about 60 movies, a very commendable but also that we find a screenshot of about 300 movies.

I am interested in the screenshot is something about the size of thumbnails (the size is now 90x90). For PVD database, this is better because it take up less space.
The possibility of such thumbnail-size 150x150 or the current size of the frame such that it can not be changed. I ask this in relation to my impaired vision, the easier this screenshot thumbnails to see clearly.
Thanks for the clarification.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


sinus

  • Guest
Re: Filmweb.pl
« Reply #14 on: January 14, 2011, 10:09:35 pm »
I must admit that is a great movie data base (basic to know). In my case I have in PVD database currently includes around 560 movies from this we can not find any information for about 60 movies, a very commendable but also that we find a screenshot of about 300 movies.

In fact, with PVD and my script it can be useful also for non-polish users. :D

I am interested in the screenshot is something about the size of thumbnails (the size is now 90x90). For PVD database, this is better because it take up less space.
The possibility of such thumbnail-size 150x150 or the current size of the frame such that it can not be changed. I ask this in relation to my impaired vision, the easier this screenshot thumbnails to see clearly.
Thanks for the clarification.

Check new version. I added option (default enabled) to get large (in original size) screenshots. And, of course, I get for now only a few screenshots which are available on main movie page.

Full size screenshot you can see after double-click on thumbnail.
« Last Edit: January 14, 2011, 10:11:20 pm by sinus »

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2667
    • View Profile
Re: Filmweb.pl
« Reply #15 on: January 15, 2011, 08:24:53 am »
I must admit that is a great movie data base (basic to know). In my case I have in PVD database currently includes around 560 movies from this we can not find any information for about 60 movies, a very commendable but also that we find a screenshot of about 300 movies.

In fact, with PVD and my script it can be useful also for non-polish users. :D

I am interested in the screenshot is something about the size of thumbnails (the size is now 90x90). For PVD database, this is better because it take up less space.
The possibility of such thumbnail-size 150x150 or the current size of the frame such that it can not be changed. I ask this in relation to my impaired vision, the easier this screenshot thumbnails to see clearly.
Thanks for the clarification.

Check new version. I added option (default enabled) to get large (in original size) screenshots. And, of course, I get for now only a few screenshots which are available on main movie page.

Full size screenshot you can see after double-click on thumbnail.

Thank you very much for larger screenshots.
This screenshot thumbnail size is acceptable for me.

[attachment deleted by admin]
« Last Edit: January 15, 2011, 09:08:58 am by Ivek23 »
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2667
    • View Profile
Re: Filmweb.pl
« Reply #16 on: January 15, 2011, 07:36:44 pm »
With the previous version filmweb 0.0.0.5 I transferred the screenshot but the filmweb 0.0.0.6 I would like to replace certain screenshot thumbnails for larger and are not replaced, except when they physically removes himself before me by the new order.
Is that what you do to be automatically switched to the new screenshot thumbnails.
But it is also a problem in their own screenshot images, because even if script does not transfer screenshot images from filmweb.pl page.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2667
    • View Profile
Re: Filmweb.pl
« Reply #17 on: January 17, 2011, 08:46:53 pm »
In version 0.0.0.5 and 0.0.0.6 does not work (download) more data for rating, votes, and poster images somehow from 18.00 hours today (at least at my place this above does not work anymore).
Since I use both versions would of course be glad of the correction of both versions.
Thank you for such a request.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


sinus

  • Guest
Re: Filmweb.pl
« Reply #18 on: January 17, 2011, 10:31:13 pm »
With the previous version filmweb 0.0.0.5 I transferred the screenshot but the filmweb 0.0.0.6 I would like to replace certain screenshot thumbnails for larger and are not replaced, except when they physically removes himself before me by the new order.
Is that what you do to be automatically switched to the new screenshot thumbnails.
But it is also a problem in their own screenshot images, because even if script does not transfer screenshot images from filmweb.pl page.

I don't see any function for scripts to clear screenshots or override screenshot with new one. Even, I don't see any option in program.

In version 0.0.0.5 and 0.0.0.6 does not work (download) more data for rating, votes, and poster images somehow from 18.00 hours today (at least at my place this above does not work anymore).
Since I use both versions would of course be glad of the correction of both versions.
Thank you for such a request.

Thank you for information. There are small changes in page. Uploaded 0.0.0.7 with fixes and importing "release" field (but months names are in polish).

Why you use 0.0.0.5?
« Last Edit: January 17, 2011, 10:32:46 pm by sinus »

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2667
    • View Profile
Re: Filmweb.pl
« Reply #19 on: January 18, 2011, 06:44:52 pm »
Quote
Why you use 0.0.0.5?

From the simple reason that in version 0.0.0.6, the rating did not show the custom field but only votes in version 0.0.0.5 and both rating and the votes were in the custom field.

In the screenshot thumbnails is because version 0.0.0.5 for all those movies where I found the screenshot thumbnails rather than important, it may have been small (90x90) and 5 or 6 screenshot images quite enough for all the other movies that made me it seemed important (like all movies about James Bond or John Wayne movies and many Western movies - by the way I am a big fan of good classic Western movies), I am due to larger (often there were a large number of screenshot thumbnails - maximum 10 screenshot thumbnail) screenshot thumbnails using version 0.0.0.6.

For version 0.0.0.7, I can not say anything because I do this script does not display anything - does not work.

I did some tests:

1.) If you do not copy the URL into the URL box script does not work.

2.) If you copy the URL in the URL field and script (from version 0.0.0.5 to version 0.0.0.7) works, but not all.

It does not work:

Rating in the custom field.

Description in PVD description box works, but the custom field (say, by Filmweb.pl) did not - sorry for description, my mistake in the appointment of a custom field.
« Last Edit: January 18, 2011, 09:03:08 pm by Ivek23 »
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


 

anything