The Movie Database Support

I found this entry:

{'adult': False,
 'backdrop_path': None,
 'genre_ids': ['Drama'],
 'id': 830366,
 'original_language': 'ru',
 'original_title': 'Thoughts in the forest',
 'overview': 'A man comes to an isolated forest to confront his troubled relationship with his girlfriend and brother.',
 'popularity': 0.6,
 'poster_path': '/nM7Gajs2mQxykQdFIE8sj4Md5Vn.jpg',
 'release_date': '2021-05-04',
 'title': 'Thoughts in the forest',
 'video': False,
 'vote_average': 10,
 'vote_count': 1}

where the genre_ids is not an integer. This messes up my code, as I have to keep adding exceptions and checking that the fields are what they are expected to be. Is there a regular maintenance of the MTDB database to guarantee that the fields contain the correct type of data? Thanks

2 replies (on page 1 of 1)

Jump to last post

That looks like something client side as a number of the values you have in your response are not values that we return on the API. For example:

'adult': False,
'backdrop_path': None,
'genre_ids': ['Drama'],
'video': False,
'vote_average': 10,

We don't return False, None integers for vote_average, or an array of string genres.

Request

curl -v "https://api.themoviedb.org/3/movie/830366?api_key=###"

*   Trying 2600:9000:2044:9e00:c:174a:c400:93a1:443...
* Connected to api.themoviedb.org (2600:9000:2044:9e00:c:174a:c400:93a1) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_128_GCM_SHA256
* ALPN, server accepted to use h2
* Server certificate:
*  subject: CN=*.themoviedb.org
*  start date: Nov 20 00:00:00 2020 GMT
*  expire date: Dec 19 23:59:59 2021 GMT
*  subjectAltName: host "api.themoviedb.org" matched cert's "*.themoviedb.org"
*  issuer: C=US; O=Amazon; OU=Server CA 1B; CN=Amazon
*  SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x7f9691008200)
> GET /3/movie/830366?api_key=### HTTP/2
> Host: api.themoviedb.org
> user-agent: curl/7.76.1
> accept: */*
>
* Connection state changed (MAX_CONCURRENT_STREAMS == 128)!
< HTTP/2 200
< content-type: application/json;charset=utf-8
< content-length: 758
< date: Thu, 22 Jul 2021 16:23:00 GMT
< server: openresty
< access-control-allow-origin: *
< access-control-allow-methods: GET, HEAD, POST, PUT, DELETE, OPTIONS
< access-control-expose-headers: ETag, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, Retry-After, Content-Length, Content-Range
< cache-control: public, max-age=28800
< x-memc: HIT
< x-memc-key: 2d3c43ea970f1b3b667efa36f3555e9e9a043fb5
< x-memc-age: 609
< x-memc-expires: 15530
< etag: W/"8f87d3487df903250fcfa1d944cfeafd"
< vary: Accept-Encoding,Accept-Encoding
< x-cache: Miss from cloudfront
< via: 1.1 b90bbd3e21074296bb0c0cac8328de63.cloudfront.net (CloudFront)
< x-amz-cf-pop: YTO50-C2
< x-amz-cf-id: qEJBXVLzNoBUF4NqHAw74lmjKT8Ti_3mdCYqkwhsgISvSLBn6d2ILA==
<
* Connection #0 to host api.themoviedb.org left intact

Response

{
  "adult": false,
  "backdrop_path": null,
  "belongs_to_collection": null,
  "budget": 100,
  "genres": [
    {
      "id": 18,
      "name": "Drama"
    }
  ],
  "homepage": "",
  "id": 830366,
  "imdb_id": "tt14590592",
  "original_language": "ru",
  "original_title": "Thoughts in the forest",
  "overview": "A man comes to an isolated forest to confront his troubled relationship with his girlfriend and brother.",
  "popularity": 0.6,
  "poster_path": "/nM7Gajs2mQxykQdFIE8sj4Md5Vn.jpg",
  "production_companies": [],
  "production_countries": [
    {
      "iso_3166_1": "UA",
      "name": "Ukraine"
    }
  ],
  "release_date": "2021-05-04",
  "revenue": 0,
  "runtime": 11,
  "spoken_languages": [
    {
      "english_name": "Russian",
      "iso_639_1": "ru",
      "name": "Pусский"
    }
  ],
  "status": "Released",
  "tagline": "",
  "title": "Thoughts in the forest",
  "video": false,
  "vote_average": 10.0,
  "vote_count": 1
}

I used the discover movie end:

https://api.themoviedb.org/4/discover/movie?api_key=MYAPIKEY&language=en-US&sort_by=popularity.desc&include_adult=false&include_video=false&page=<ALLPAGES>&with_original_language=ru&with_watch_monetization_types=flatrate

I don't remember the page number, though.

Can't find a movie or TV show? Login to create it.

Global

s focus the search bar
p open profile menu
esc close an open window
? open keyboard shortcut window

On media pages

b go back (or to parent when applicable)
e go to edit page

On TV season pages

(right arrow) go to next season
(left arrow) go to previous season

On TV episode pages

(right arrow) go to next episode
(left arrow) go to previous episode

On all image pages

a open add image window

On all edit pages

t open translation selector
ctrl+ s submit form

On discussion pages

n create new discussion
w toggle watching status
p toggle public/private
c toggle close/open
a open activity
r reply to discussion
l go to last reply
ctrl+ enter submit your message
(right arrow) next page
(left arrow) previous page

Want to rate or add this item to a list?

Login