תמיכת The Movie Database

Hello How can I track the output of new episodes for TV shows? Suppose I added 1000 serials. For each series, I must make at least two requests every day: 1. Check all episodes of the current season (for example, https://api.themoviedb.org/3/tv/54650/season/5?api_key=). 2 Check if the new season has come out (for example, https://api.themoviedb.org/3/tv/54650/season/6?api_key=). Total 2000 requests each day. Will this work?

Can I get a list of added episodes for each day? For example, the list of episodes added for August 1, 2018, for August 2, 2018... So I would have only one request per day.

Thanks

4 תגובות (בדף 1 מתוך 1)

Jump to last post

The TV show details method has two fairly new fields, last_episode_to_air and next_episode_to_air which might be helpful for you to track what's coming next. If either of those 2 fields don't work for you, the only way would be to check the season like you are already doing.

There is no way to get a list of episodes that have been added per day.

Thanks. Is there a limit on the number of requests per day ?

There's no limit per day per-say, our rate limiting is enforced in 10 second buckets per IP address. You can read more about that here: https://developers.themoviedb.org/3/getting-started/request-rate-limiting

Thanks.

"You can use the X-RateLimit headers that get returned with every request to keep track of your current limits. If you exceed the limit, you will receive a 429 HTTP status with a Retry-After header"

That I add to this code (like X-RateLimit) so as not to get caught by the constraint:

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.themoviedb.org/3/tv/xxx/season/xxx?language=en-US&api_key=xxx",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "{}",
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}

.לא מצאת סרט או סדרה? היכנס כדי ליצור אותם

עולמי

s התמקד בשורת החיפוש
p פתח תפריט פרופיל
esc סגור חלון פתוח
? פתח חלון קיצורי דרך של מקלדת

בדפי מדיה

b לך חזרה (או אל הורה אם ישים)
e לך אל דף עריכה

בדפי עונות

(חץ ימני) לך אל העונה הבאה
(חץ שמאלי) לך אל העונה הקודמת

בדפי סדרות

(חץ ימני) לך אל הפרק הבא
(חץ שמאלי) לך אל הפרק הקודם

בכל דפי תמונה

a פתח חלון הוספת תמונה

בכל דפי עריכה

t פתח בוחר תרגום
ctrl+ s הגש טופס

בדפי דיון

n צור דיון חדש
w עורר מעמד צפייה
p עורר ציבורי/פרטי
c עורר סגירה/פתיחה
a פתח פעילות
r השב אל דיון
l לך אל תשובה אחרונה
ctrl+ enter הגש את הודעתך
(חץ ימני) הדף הבא
(חץ שמאלי) הדף הקודם

הגדרות

?רוצה לדרג או להוסיף פריט אל רשימה

היכנס