Skip to content

Commit 1733fec

Browse files
committed
starter (again)
1 parent 251e6f6 commit 1733fec

File tree

3 files changed

+0
-150
lines changed

3 files changed

+0
-150
lines changed

apps/10_movie_search/final/movie_client.py

-44
This file was deleted.

apps/10_movie_search/final/play.py

-52
Original file line numberDiff line numberDiff line change
@@ -1,52 +0,0 @@
1-
import requests
2-
import collections
3-
4-
MovieResult = collections.namedtuple(
5-
'MovieResult',
6-
'Title,Poster,Type,imdbID,Year'
7-
)
8-
9-
search = 'capital'
10-
url = 'http://www.omdbapi.com/?s={}&y=&plot=short&r=json'.format(search)
11-
12-
r = requests.get(url)
13-
data = r.json()
14-
15-
results = data['Search']
16-
17-
# movies = []
18-
# for result in results:
19-
# m = MovieResult(
20-
# Title=result['Title'],
21-
# Poster=result['Poster'],
22-
# Type=result['Type'],
23-
# imdbID=result['imdbID'],
24-
# Year=result['Year']
25-
# )
26-
# movies.append(m)
27-
28-
# def method_with_kws(pos1, **kwargs)
29-
# pass
30-
31-
# movies = []
32-
# for result in results:
33-
# m = MovieResult(**result)
34-
# movies.append(m)
35-
36-
movies = [
37-
MovieResult(**m)
38-
for m in results
39-
]
40-
41-
print(movies)
42-
43-
44-
45-
46-
47-
48-
49-
50-
51-
52-

apps/10_movie_search/final/program.py

-54
This file was deleted.

0 commit comments

Comments
 (0)