def movies_from_url(urls):
all_movie = []
for u in urls:
# r is a return datum,r is the object of response
r = requests.get( u ),
# page is bytes tape
page = r.content
# root is a structure(texture) of tree
root = html.fromstring( page )
# return a list
moveie_divs = root.xpath( '//div[@class="item"]' )
movies = [movie_from_div( div ) for div in moveie_divs]
all_movie.extend( movies )
return all_movie
all_movie = []
for u in urls:
# r is a return datum,r is the object of response
r = requests.get( u ),
# page is bytes tape
page = r.content
# root is a structure(texture) of tree
root = html.fromstring( page )
# return a list
moveie_divs = root.xpath( '//div[@class="item"]' )
movies = [movie_from_div( div ) for div in moveie_divs]
all_movie.extend( movies )
return all_movie