Film¶
-
class
filmweb.items.
Film
(fw, uid, type='unknown', name=None, poster=None, name_org=None, year=None, rate=None, votes=None, duration=None)¶ -
fw
= None¶ Filmweb
instance
-
type
= None¶ film, serial or videogame.
-
name
= None¶ Localized name.
-
poster
= None¶ Relative poster path, use
get_poster()
for absolute path.
-
name_org
= None¶ Original name.
-
votes
= None¶ Amount of how many people voted on this film.
-
duration
= None¶ Duration in minutes.
-
get_poster
(size='small')¶ Returns absolute path of specified size poster.
Parameters: size (str) – poster size (see common.poster_sizes) Returns: URL Return type: str or None
-
get_description
()¶ Returns full film description.
Returns: description Return type: str
-
get_review
()¶ Returns film review.
Returns: review Return type: dict or None { 'title': str(), 'content': str(), 'author': User(uid, name, img) }
-
get_info
()¶ Returns informations about film and updates object variables.
Returns: info Return type: dict { 'name': str(), 'name_org': str(), 'rate': float(), 'votes': int(), 'genres': [], 'year': str(), 'duration': int(), # in minutes 'discussion_url': str(), 'has_review': bool(), 'has_description': bool(), 'poster_small': str(), 'trailer': Video(uid, category, film, img, min_age, vid_urls), 'premiere': str(), # Y-m-d 'premiere_local': str(), # Y-m-d 'type': str(), 'season_count': int(), 'episode_count': int(), 'countries': [], 'description_short': str(), 'top_pos': int(), 'wanna_see_count': int(), 'not_interested_count': int(), # unconfirmed 'recommended': bool() 'curiosities_count': int(), 'boxoffice': int(), 'boxoffice_top_pos': int(), 'budget': int() }
Note
You can use
Filmweb.update_films_info()
if you want get basic info about multiple Film instances with only one request.
-
get_persons
(role_type, offset=0)¶ Returns persons with specified role type in this film.
Parameters: - role_type (str) – see common.person_role_types
- offset (int) – start position
Returns: list
Return type: list of dicts
[ { 'person': Person(uid, name, poster), 'role': str(), # see common.person_role_types 'role_extra_info': str() } ]
-
get_persons_lead
()¶ Returns film lead persons.
Returns: list Return type: list of dicts [ { 'person': Person(uid, name, poster), 'role_type': str(), # see common.person_role_types 'role': str(), 'role_extra_info': str() } ]
-
get_images
(offset=0)¶ Returns film images.
Parameters: offset (str) – start position Returns: list of Image
’sReturn type: list
-
get_platforms
()¶ Returns videogame platforms. Throws ValueError if it’s not videogame.
Returns: list of platforms Return type: list of strings
-
get_broadcasts
()¶ Returns film TV broadcasts.
Returns: list of broadcasts Return type: list of dicts [ { 'channel': Channel(uid), 'time': str(), # H:M 'date': str(), # Y-m-d 'uid': int() } ]
-