TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Imdb-pie – Python IMDB client using the IMDB json web service for their iOS app

27 点作者 rodwyer超过 12 年前

6 条评论

JulianWasTaken超过 12 年前
Hi, nice job.<p>A few unsolicited code tips that seem to come up often if I may:<p>- `if &#60;somestuff&#62;: return True; else: return False` is always best spelled `return &#60;somestuff&#62;`<p>- You only need the global statement when you want to <i>assign</i> to a global, not access one<p>- `foo = d["bla"] if "bla" in d else None` is just `foo = d.get("bla")`<p>- You have mutable default args. They probably are not what you want. See <a href="http://docs.python-guide.org/en/latest/writing/gotchas/#mutable-default-arguments" rel="nofollow">http://docs.python-guide.org/en/latest/writing/gotchas/#muta...</a> for e.g. for an explanation.<p>- Lots of your dicts with enumerates to set indices should just probably be lists<p>If I get a chance later I'll try to throw together a quick pull request, but otherwise, thanks for sharing.
评论 #5091818 未加载
评论 #5091669 未加载
berendhh超过 12 年前
One Question: What robots.txt do you have to obey? <a href="http://app.imdb.com/robots.txt" rel="nofollow">http://app.imdb.com/robots.txt</a> or <a href="http://www.imdb.com/robots.txt" rel="nofollow">http://www.imdb.com/robots.txt</a>?<p>The second one is rather restrictive (and the first one does not exist...)
评论 #5092062 未加载
up_and_up超过 12 年前
Not sure why this is big news.<p>There has been a ruby library called imdb-party that I used several years ago to do this: <a href="https://github.com/maddox/imdb-party" rel="nofollow">https://github.com/maddox/imdb-party</a>. Leverages the IMDB iOS API also.<p>Here is part of the code I used for simulating their id system (ex: tt0903624): # <a href="http://www.imdb.com/title/tt0903624/" rel="nofollow">http://www.imdb.com/title/tt0903624/</a><p>require "imdb_party"<p>imdb = ImdbParty::Imdb.new<p>all_movies = (1..999999).map{ |m| "tt" + ("%07d" % m).to_s }<p><pre><code> (all_movies - current_movies).each do |movie_id| movie = imdb.find_movie_by_id(movie_id) rescue next</code></pre>
dpiers超过 12 年前
Nice project! A few years ago I hacked together a python IMDB API to help me cheat err... 'practice' for a trivia game:<p><a href="https://github.com/dpiers/pymdb" rel="nofollow">https://github.com/dpiers/pymdb</a><p>Last I checked it still worked, surprising since I was just scraping html. :)
hcarvalhoalves超过 12 年前
I'm guessing this is against their TOS?
评论 #5092107 未加载
b33fer超过 12 年前
Very nice