Web Scraping дает весь html

Pietro de Falco спросил: 12 мая 2018 в 03:54 в: python

Мне интересно собирать бюджеты на производство, национальные брутто, глобальные брутто и названия.

Используя следующий код, у меня есть весь HTML, а мне нужен текст:

import re
import requests
from bs4 import BeautifulSoup
URL = 'https://www.the-numbers.com/movie/budgets/all'def scarica_pagina(link):
    page = requests.get(link)
    soup = BeautifulSoup(page.text, 'lxml')
    cnt=0
    for film in soup.find("table").find_all("tr"):
        cnt=cnt+1
        title = film.find_all('b')
        budget = film.find_all('td')
        print(cnt, title, budget)if __name__ == '__main__':
     scarica_pagina(URL)

Я попытался выполнить код:

title = film.find_all('b').text 
budget = film.find_all('td').text  

Однако возникает следующая ошибка:

"Объект ResultSet не имеет атрибута"% s ". Вероятно, вы обрабатываете список предметов, как один элемент. Вы вызывали find_all (), когда вы хотели вызвать find ()?" % keyAttributeError: объект ResultSet не имеет атрибута 'text'. Вероятно, вы обрабатываете список предметов, как один элемент. Вы вызывали find_all (), когда вы хотели вызвать find ()? "

Действительно, я удалил .text, получив весь HTML.

Пожалуйста, помогите мне.


4 ответа

Есть решение
SIM ответил: 12 мая 2018 в 09:10

Попробуйте приведенный ниже подход, чтобы получить ожидаемые результаты:

import requests
from bs4 import BeautifulSoupdef scarica_pagina(link):
    page = requests.get(link)
    soup = BeautifulSoup(page.text, 'lxml')
    for film in soup.find("table").find_all("tr")[1::2]:
        title = film.find_all("b")[0].get_text(strip=True)
        budget = film.find_all('td',class_="data")[1].get_text(strip=True)
        domesticgross = film.find_all('td',class_="data")[2].get_text(strip=True)
        worldwidegross = film.find_all('td',class_="data")[3].get_text(strip=True)
        print("{}|{}|{}|{}".format(title,budget,domesticgross,worldwidegross))if __name__ == '__main__':
    scarica_pagina('https://www.the-numbers.com/movie/budgets/all')

Выход:

Avatar|$425,000,000|$760,507,625|$2,783,450,595
Pirates of the Caribbean: On Stranger Tides|$410,600,000|$241,063,875|$1,045,663,875
Avengers: Age of Ultron|$330,600,000|$459,005,868|$1,408,218,722
Star Wars Ep. VII: The Force Awakens|$306,000,000|$936,662,225|$2,058,662,225
Avengers: Infinity War|$300,000,000|$644,169,802|$1,973,570,489
Pirates of the Caribbean: At Worldâs End|$300,000,000|$309,420,425|$963,420,425

Посмотрите также:

Pietro de Falco ответил: 12 мая 2018 в 08:42
он останавливается на 6-й строке с этой ошибкой: print ("{} | {} | {} | {}". format (title, budget, internalgross, worldwidegross)) UnicodeEncodeError: кодек ascii не может кодировать символы в позиции 34 -36: порядковый номер не в диапазоне (128)
SIM ответил: 12 мая 2018 в 08:45
Проверьте обновление.
Pietro de Falco ответил: 12 мая 2018 в 08:54
снова: UnicodeEncodeError: кодек ascii не может кодировать символы в позиции 34-36: порядковый номер не в диапазоне (128)
SIM ответил: 12 мая 2018 в 08:59
Хорошо, попробуйте еще раз.
Pietro de Falco ответил: 12 мая 2018 в 09:03
Такая же ошибка ... это сработает для вас?
Eliot K ответил: 12 мая 2018 в 04:00

find_all() возвращает список. Чтобы получить текст, вам нужно ссылаться на один элемент в этом списке:

title = film.find_all('b')[0].text
budget = film.find_all('td')[0].text
Pietro de Falco ответил: 12 мая 2018 в 04:07
Эта ошибка появляется: title = film.find_all ('b') [0] .text IndexError: индекс индекса за пределами диапазона
Dionisio Ramirez Flores ответил: 12 мая 2018 в 04:04

Вам нужно указать позицию текста, который вы хотите извлечь, findAll migth возвращает более одного элемента, чтобы вы могли их получить:

title = film.find_all('b')[0].text
budget = film.find_all('td')[0].text

Вы можете изменить "0", если вам нужен другой элемент внутри списка.

Pietro de Falco ответил: 12 мая 2018 в 04:07
Эта ошибка появляется: title = film.find_all ('b') [0] .text IndexError: индекс индекса за пределами диапазона
Dionisio Ramirez Flores ответил: 12 мая 2018 в 04:12
@Pietro de Falco try title = film.find_all ('b') titleText = title [0] .text У меня есть похожий скрипт, и он работает для меня.
Ajax1234 ответил: 12 мая 2018 в 04:16

Вы можете очистить таблицу, используя BeautifulSoup.find_all:

import requests
from bs4 import BeautifulSoup as soup
d = soup(requests.get('https://www.the-numbers.com/movie/budgets/all').text, 'html.parser')
headers = ['rank']+[i.text for i in d.find('tr').find_all('th')][1:]
full_results = [i.text for i in d.find_all('td')] 
rows = [dict(zip(headers, full_results[i:i+6])) for i in range(0, len(full_results), 6)]
print(rows)

Выход:

[{'rank': '1', 'Release Date': '12/18/2009', 'Movie': 'Avatar', 'Production Budget': '$425,000,000', 'Domestic Gross': '$760,507,625', 'Worldwide Gross': '$2,783,450,595'}, {'rank': '2', 'Release Date': '5/20/2011', 'Movie': 'Pirates of the Caribbean: On Stranger Tides', 'Production Budget': '$410,600,000', 'Domestic Gross': '$241,063,875', 'Worldwide Gross': '$1,045,663,875'}, {'rank': '3', 'Release Date': '5/1/2015', 'Movie': 'Avengers: Age of Ultron', 'Production Budget': '$330,600,000', 'Domestic Gross': '$459,005,868', 'Worldwide Gross': '$1,408,218,722'}, {'rank': '4', 'Release Date': '12/18/2015', 'Movie': 'Star Wars Ep. VII: The Force Awakens', 'Production Budget': '$306,000,000', 'Domestic Gross': '$936,662,225', 'Worldwide Gross': '$2,058,662,225'}, {'rank': '5', 'Release Date': '4/27/2018', 'Movie': 'Avengers: Infinity War', 'Production Budget': '$300,000,000', 'Domestic Gross': '$643,006,211', 'Worldwide Gross': '$1,972,406,898'}, {'rank': '6', 'Release Date': '5/24/2007', 'Movie': 'Pirates of the Caribbean: At Worldâ\x80\x99s End', 'Production Budget': '$300,000,000', 'Domestic Gross': '$309,420,425', 'Worldwide Gross': '$963,420,425'}, {'rank': '7', 'Release Date': '11/17/2017', 'Movie': 'Justice League', 'Production Budget': '$300,000,000', 'Domestic Gross': '$229,024,295', 'Worldwide Gross': '$655,953,446'}, {'rank': '8', 'Release Date': '11/6/2015', 'Movie': 'Spectre', 'Production Budget': '$300,000,000', 'Domestic Gross': '$200,074,175', 'Worldwide Gross': '$879,620,923'}, {'rank': '9', 'Release Date': '7/20/2012', 'Movie': 'The Dark Knight Rises', 'Production Budget': '$275,000,000', 'Domestic Gross': '$448,139,099', 'Worldwide Gross': '$1,084,439,099'}, {'rank': '10', 'Release Date': '7/2/2013', 'Movie': 'The Lone Ranger', 'Production Budget': '$275,000,000', 'Domestic Gross': '$89,302,115', 'Worldwide Gross': '$260,002,115'}, {'rank': '11', 'Release Date': '3/9/2012', 'Movie': 'John Carter', 'Production Budget': '$275,000,000', 'Domestic Gross': '$73,058,679', 'Worldwide Gross': '$282,778,100'}, {'rank': '12', 'Release Date': '11/24/2010', 'Movie': 'Tangled', 'Production Budget': '$260,000,000', 'Domestic Gross': '$200,821,936', 'Worldwide Gross': '$586,477,240'}, {'rank': '13', 'Release Date': '5/4/2007', 'Movie': 'Spider-Man 3', 'Production Budget': '$258,000,000', 'Domestic Gross': '$336,530,303', 'Worldwide Gross': '$894,860,230'}, {'rank': '14', 'Release Date': '5/6/2016', 'Movie': 'Captain America: Civil War', 'Production Budget': '$250,000,000', 'Domestic Gross': '$408,084,349', 'Worldwide Gross': '$1,153,304,495'}, {'rank': '15', 'Release Date': '3/25/2016', 'Movie': 'Batman v Superman: Dawn of Justice', 'Production Budget': '$250,000,000', 'Domestic Gross': '$330,360,194', 'Worldwide Gross': '$868,160,194'}, {'rank': '16', 'Release Date': '12/14/2012', 'Movie': 'The Hobbit: An Unexpected Journey', 'Production Budget': '$250,000,000', 'Domestic Gross': '$303,003,568', 'Worldwide Gross': '$1,017,003,568'}, {'rank': '17', 'Release Date': '7/15/2009', 'Movie': 'Harry Potter and the Half-Blood Prince', 'Production Budget': '$250,000,000', 'Domestic Gross': '$301,959,197', 'Worldwide Gross': '$935,083,686'}, {'rank': '18', 'Release Date': '12/13/2013', 'Movie': 'The Hobbit: The Desolation of Smaug', 'Production Budget': '$250,000,000', 'Domestic Gross': '$258,366,855', 'Worldwide Gross': '$960,366,855'}, {'rank': '19', 'Release Date': '12/17/2014', 'Movie': 'The Hobbit: The Battle of the Five Armies', 'Production Budget': '$250,000,000', 'Domestic Gross': '$255,119,788', 'Worldwide Gross': '$955,119,788'}, {'rank': '20', 'Release Date': '4/14/2017', 'Movie': 'The Fate of the Furious', 'Production Budget': '$250,000,000', 'Domestic Gross': '$225,764,765', 'Worldwide Gross': '$1,237,466,026'}, {'rank': '21', 'Release Date': '6/28/2006', 'Movie': 'Superman Returns', 'Production Budget': '$232,000,000', 'Domestic Gross': '$200,120,000', 'Worldwide Gross': '$374,085,065'}, {'rank': '22', 'Release Date': '5/26/2017', 'Movie': 'Pirates of the Caribbean: Dead Men Tell No Tales', 'Production Budget': '$230,000,000', 'Domestic Gross': '$172,558,876', 'Worldwide Gross': '$790,697,888'}, {'rank': '23', 'Release Date': '11/14/2008', 'Movie': 'Quantum of Solace', 'Production Budget': '$230,000,000', 'Domestic Gross': '$169,368,427', 'Worldwide Gross': '$591,692,078'}, {'rank': '24', 'Release Date': '5/4/2012', 'Movie': 'The Avengers', 'Production Budget': '$225,000,000', 'Domestic Gross': '$623,279,547', 'Worldwide Gross': '$1,519,479,547'}, {'rank': '25', 'Release Date': '7/7/2006', 'Movie': 'Pirates of the Caribbean: Dead Manâ\x80\x99s Chest', 'Production Budget': '$225,000,000', 'Domestic Gross': '$423,315,812', 'Worldwide Gross': '$1,066,215,812'}, {'rank': '26', 'Release Date': '6/14/2013', 'Movie': 'Man of Steel', 'Production Budget': '$225,000,000', 'Domestic Gross': '$291,045,518', 'Worldwide Gross': '$667,999,518'}, {'rank': '27', 'Release Date': '5/16/2008', 'Movie': 'The Chronicles of Narnia: Prince Caspian', 'Production Budget': '$225,000,000', 'Domestic Gross': '$141,621,490', 'Worldwide Gross': '$417,341,288'}, {'rank': '28', 'Release Date': '7/3/2012', 'Movie': 'The Amazing Spider-Man', 'Production Budget': '$220,000,000', 'Domestic Gross': '$262,030,663', 'Worldwide Gross': '$757,890,267'}, {'rank': '29', 'Release Date': '6/21/2017', 'Movie': 'Transformers: The Last Knight', 'Production Budget': '$217,000,000', 'Domestic Gross': '$130,168,683', 'Worldwide Gross': '$603,968,683'}, {'rank': '30', 'Release Date': '6/12/2015', 'Movie': 'Jurassic World', 'Production Budget': '$215,000,000', 'Domestic Gross': '$652,270,625', 'Worldwide Gross': '$1,671,713,208'}, {'rank': '31', 'Release Date': '5/25/2012', 'Movie': 'Men in Black 3', 'Production Budget': '$215,000,000', 'Domestic Gross': '$179,020,854', 'Worldwide Gross': '$654,213,485'}, {'rank': '32', 'Release Date': '6/24/2009', 'Movie': 'Transformers: Revenge of the Fallen', 'Production Budget': '$210,000,000', 'Domestic Gross': '$402,111,870', 'Worldwide Gross': '$836,519,699'}, {'rank': '33', 'Release Date': '6/27/2014', 'Movie': 'Transformers: Age of Extinction', 'Production Budget': '$210,000,000', 'Domestic Gross': '$245,439,076', 'Worldwide Gross': '$1,104,039,076'}, {'rank': '34', 'Release Date': '5/26/2006', 'Movie': 'X-Men: The Last Stand', 'Production Budget': '$210,000,000', 'Domestic Gross': '$234,362,462', 'Worldwide Gross': '$459,260,946'}, {'rank': '35', 'Release Date': '5/14/2010', 'Movie': 'Robin Hood', 'Production Budget': '$210,000,000', 'Domestic Gross': '$105,487,148', 'Worldwide Gross': '$322,459,006'}, {'rank': '36', 'Release Date': '5/18/2012', 'Movie': 'Battleship', 'Production Budget': '$209,000,000', 'Domestic Gross': '$65,233,400', 'Worldwide Gross': '$305,218,228'}, {'rank': '37', 'Release Date': '12/14/2005', 'Movie': 'King Kong', 'Production Budget': '$207,000,000', 'Domestic Gross': '$218,080,025', 'Worldwide Gross': '$550,517,357'}, {'rank': '38', 'Release Date': '12/7/2007', 'Movie': 'The Golden Compass', 'Production Budget': '$205,000,000', 'Domestic Gross': '$70,107,728', 'Worldwide Gross': '$367,262,558'}, {'rank': '39', 'Release Date': '2/16/2018', 'Movie': 'Black Panther', 'Production Budget': '$200,000,000', 'Domestic Gross': '$699,129,850', 'Worldwide Gross': '$1,346,141,626'}, {'rank': '40', 'Release Date': '12/19/1997', 'Movie': 'Titanic', 'Production Budget': '$200,000,000', 'Domestic Gross': '$659,363,944', 'Worldwide Gross': '$2,208,208,395'}, {'rank': '41', 'Release Date': '12/16/2016', 'Movie': 'Rogue One: A Star Wars Story', 'Production Budget': '$200,000,000', 'Domestic Gross': '$532,177,324', 'Worldwide Gross': '$1,050,988,488'}, {'rank': '42', 'Release Date': '6/17/2016', 'Movie': 'Finding Dory', 'Production Budget': '$200,000,000', 'Domestic Gross': '$486,295,561', 'Worldwide Gross': '$1,022,617,376'}, {'rank': '43', 'Release Date': '6/18/2010', 'Movie': 'Toy Story 3', 'Production Budget': '$200,000,000', 'Domestic Gross': '$415,004,880', 'Worldwide Gross': '$1,069,666,004'}, {'rank': '44', 'Release Date': '5/3/2013', 'Movie': 'Iron Man 3', 'Production Budget': '$200,000,000', 'Domestic Gross': '$408,992,272', 'Worldwide Gross': '$1,215,392,272'}, {'rank': '45', 'Release Date': '5/5/2017', 'Movie': 'Guardians of the Galaxy Vol 2', 'Production Budget': '$200,000,000', 'Domestic Gross': '$389,813,101', 'Worldwide Gross': '$863,197,744'}, {'rank': '46', 'Release Date': '6/30/2004', 'Movie': 'Spider-Man 2', 'Production Budget': '$200,000,000', 'Domestic Gross': '$373,524,485', 'Worldwide Gross': '$795,110,670'}, {'rank': '47', 'Release Date': '3/5/2010', 'Movie': 'Alice in Wonderland', 'Production Budget': '$200,000,000', 'Domestic Gross': '$334,191,110', 'Worldwide Gross': '$1,025,491,110'}, {'rank': '48', 'Release Date': '11/8/2012', 'Movie': 'Skyfall', 'Production Budget': '$200,000,000', 'Domestic Gross': '$304,360,277', 'Worldwide Gross': '$1,110,526,981'}, {'rank': '49', 'Release Date': '6/21/2013', 'Movie': 'Monsters University', 'Production Budget': '$200,000,000', 'Domestic Gross': '$268,488,329', 'Worldwide Gross': '$743,588,329'}, {'rank': '50', 'Release Date': '3/8/2013', 'Movie': 'Oz the Great and Powerful', 'Production Budget': '$200,000,000', 'Domestic Gross': '$234,770,996', 'Worldwide Gross': '$490,359,051'}, {'rank': '51', 'Release Date': '5/23/2014', 'Movie': 'X-Men: Days of Future Past', 'Production Budget': '$200,000,000', 'Domestic Gross': '$233,921,534', 'Worldwide Gross': '$747,862,775'}, {'rank': '52', 'Release Date': '5/2/2014', 'Movie': 'The Amazing Spider-Man 2', 'Production Budget': '$200,000,000', 'Domestic Gross': '$202,853,933', 'Worldwide Gross': '$708,996,336'}, {'rank': '53', 'Release Date': '6/24/2011', 'Movie': 'Cars 2', 'Production Budget': '$200,000,000', 'Domestic Gross': '$191,450,875', 'Worldwide Gross': '$560,155,383'}, {'rank': '54', 'Release Date': '12/17/2010', 'Movie': 'Tron: Legacy', 'Production Budget': '$200,000,000', 'Domestic Gross': '$172,062,763', 'Worldwide Gross': '$400,062,763'}, {'rank': '55', 'Release Date': '11/13/2009', 'Movie': '2012', 'Production Budget': '$200,000,000', 'Domestic Gross': '$166,112,167', 'Worldwide Gross': '$788,408,539'}, {'rank': '56', 'Release Date': '5/21/2009', 'Movie': 'Terminator Salvation', 'Production Budget': '$200,000,000', 'Domestic Gross': '$125,322,469', 'Worldwide Gross': '$365,491,792'}, {'rank': '57', 'Release Date': '6/17/2011', 'Movie': 'Green Lantern', 'Production Budget': '$200,000,000', 'Domestic Gross': '$116,601,172', 'Worldwide Gross': '$219,535,492'}, {'rank': '58', 'Release Date': '5/28/2010', 'Movie': 'Prince of Persia: Sands of Time', 'Production Budget': '$200,000,000', 'Domestic Gross': '$90,759,676', 'Worldwide Gross': '$314,594,597'}, {'rank': '59', 'Release Date': '6/29/2011', 'Movie': 'Transformers: Dark of the Moon', 'Production Budget': '$195,000,000', 'Domestic Gross': '$352,390,543', 'Worldwide Gross': '$1,123,790,543'}, {'rank': '60', 'Release Date': '6/9/2017', 'Movie': 'The Mummy', 'Production Budget': '$195,000,000', 'Domestic Gross': '$80,101,125', 'Worldwide Gross': '$410,333,326'}, {'rank': '61', 'Release Date': '3/1/2013', 'Movie': 'Jack the Giant Slayer', 'Production Budget': '$195,000,000', 'Domestic Gross': '$65,187,603', 'Worldwide Gross': '$197,687,603'}, {'rank': '62', 'Release Date': '4/3/2015', 'Movie': 'Furious 7', 'Production Budget': '$190,000,000', 'Domestic Gross': '$353,007,020', 'Worldwide Gross': '$1,518,722,794'}, {'rank': '63', 'Release Date': '5/16/2013', 'Movie': 'Star Trek Into Darkness', 'Production Budget': '$190,000,000', 'Domestic Gross': '$228,778,661', 'Worldwide Gross': '$467,381,584'}, {'rank': '64', 'Release Date': '6/21/2013', 'Movie': 'World War Z', 'Production Budget': '$190,000,000', 'Domestic Gross': '$202,359,711', 'Worldwide Gross': '$531,514,650'}, {'rank': '65', 'Release Date': '5/10/2013', 'Movie': 'The Great Gatsby', 'Production Budget': '$190,000,000', 'Domestic Gross': '$144,840,419', 'Worldwide Gross': '$351,040,419'}, {'rank': '66', 'Release Date': '11/6/2009', 'Movie': 'Disneyâ\x80\x99s A Christmas Carol', 'Production Budget': '$190,000,000', 'Domestic Gross': '$137,855,863', 'Worldwide Gross': '$315,709,697'}, {'rank': '67', 'Release Date': '7/12/2013', 'Movie': 'Pacific Rim', 'Production Budget': '$190,000,000', 'Domestic Gross': '$101,802,906', 'Worldwide Gross': '$411,002,906'}, {'rank': '68', 'Release Date': '11/25/2015', 'Movie': 'The Good Dinosaur', 'Production Budget': '$187,500,000', 'Domestic Gross': '$123,087,120', 'Worldwide Gross': '$334,350,427'}, {'rank': '69', 'Release Date': '5/2/2008', 'Movie': 'Iron Man', 'Production Budget': '$186,000,000', 'Domestic Gross': '$318,604,126', 'Worldwide Gross': '$585,171,547'}, {'rank': '70', 'Release Date': '7/18/2008', 'Movie': 'The Dark Knight', 'Production Budget': '$185,000,000', 'Domestic Gross': '$533,345,358', 'Worldwide Gross': '$1,001,620,618'}, {'rank': '71', 'Release Date': '5/22/2008', 'Movie': 'Indiana Jones and the Kingdom of the Crystal Skull', 'Production Budget': '$185,000,000', 'Domestic Gross': '$317,101,119', 'Worldwide Gross': '$786,635,413'}, {'rank': '72', 'Release Date': '6/22/2012', 'Movie': 'Brave', 'Production Budget': '$185,000,000', 'Domestic Gross': '$237,282,182', 'Worldwide Gross': '$554,606,532'}, {'rank': '73', 'Release Date': '3/10/2017', 'Movie': 'Kong: Skull Island', 'Production Budget': '$185,000,000', 'Domestic Gross': '$168,052,812', 'Worldwide Gross': '$561,137,727'}, {'rank': '74', 'Release Date': '7/22/2016', 'Movie': 'Star Trek Beyond', 'Production Budget': '$185,000,000', 'Domestic Gross': '$158,848,340', 'Worldwide Gross': '$336,398,312'}, {'rank': '75', 'Release Date': '10/6/2017', 'Movie': 'Blade Runner 2049', 'Production Budget': '$185,000,000', 'Domestic Gross': '$92,054,159', 'Worldwide Gross': '$259,356,836'}, {'rank': '76', 'Release Date': '11/3/2017', 'Movie': 'Thor: Ragnarok', 'Production Budget': '$180,000,000', 'Domestic Gross': '$315,058,289', 'Worldwide Gross': '$850,653,412'}, {'rank': '77', 'Release Date': '12/9/2005', 'Movie': 'The Chronicles of Narnia: The Lion, the Witch and the Wardrobe', 'Production Budget': '$180,000,000', 'Domestic Gross': '$291,710,957', 'Worldwide Gross': '$720,539,572'}, {'rank': '78', 'Release Date': '5/30/2014', 'Movie': 'Maleficent', 'Production Budget': '$180,000,000', 'Domestic Gross': '$241,407,328', 'Worldwide Gross': '$758,536,735'}, {'rank': '79', 'Release Date': '11/18/2016', 'Movie': 'Fantastic Beasts and Where to Find Them', 'Production Budget': '$180,000,000', 'Domestic Gross': '$234,037,575', 'Worldwide Gross': '$803,798,342'}, {'rank': '80', 'Release Date': '6/27/2008', 'Movie': 'WALL-E', 'Production Budget': '$180,000,000', 'Domestic Gross': '$223,808,164', 'Worldwide Gross': '$532,508,025'}, {'rank': '81', 'Release Date': '8/10/2007', 'Movie': 'Rush Hour 3', 'Production Budget': '$180,000,000', 'Domestic Gross': '$140,125,968', 'Worldwide Gross': '$256,585,882'}, {'rank': '82', 'Release Date': '7/1/2016', 'Movie': 'The Legend of Tarzan', 'Production Budget': '$180,000,000', 'Domestic Gross': '$126,643,061', 'Worldwide Gross': '$349,143,061'}, {'rank': '83', 'Release Date': '11/23/2011', 'Movie': 'Hugo', 'Production Budget': '$180,000,000', 'Domestic Gross': '$73,864,507', 'Worldwide Gross': '$180,047,784'}, {'rank': '84', 'Release Date': '7/21/2017', 'Movie': 'Valerian and the City of a Thousand Planets', 'Production Budget': '$180,000,000', 'Domestic Gross': '$40,479,370', 'Worldwide Gross': '$215,116,144'}, {'rank': '85', 'Release Date': '2/6/2015', 'Movie': 'Jupiter Ascending', 'Production Budget': '$179,000,000', 'Domestic Gross': '$47,482,519', 'Worldwide Gross': '$181,982,519'}, {'rank': '86', 'Release Date': '5/27/2016', 'Movie': 'X-Men: Apocalypse', 'Production Budget': '$178,000,000', 'Domestic Gross': '$155,442,489', 'Worldwide Gross': '$542,742,489'}, {'rank': '87', 'Release Date': '6/6/2014', 'Movie': 'Edge of Tomorrow', 'Production Budget': '$178,000,000', 'Domestic Gross': '$100,206,256', 'Worldwide Gross': '$370,541,256'}, {'rank': '88', 'Release Date': '4/15/2016', 'Movie': 'The Jungle Book', 'Production Budget': '$175,000,000', 'Domestic Gross': '$364,001,123', 'Worldwide Gross': '$963,841,800'}, {'rank': '89', 'Release Date': '6/19/2015', 'Movie': 'Inside Out', 'Production Budget': '$175,000,000', 'Domestic Gross': '$356,461,711', 'Worldwide Gross': '$857,720,660'}, {'rank': '90', 'Release Date': '7/7/2017', 'Movie': 'Spider-Man: Homecoming', 'Production Budget': '$175,000,000', 'Domestic Gross': '$334,201,140', 'Worldwide Gross': '$880,210,429'}, {'rank': '91', 'Release Date': '8/5/2016', 'Movie': 'Suicide Squad', 'Production Budget': '$175,000,000', 'Domestic Gross': '$325,100,054', 'Worldwide Gross': '$746,100,054'}, {'rank': '92', 'Release Date': '5/29/2009', 'Movie': 'Up', 'Production Budget': '$175,000,000', 'Domestic Gross': '$293,004,164', 'Worldwide Gross': '$731,463,377'}, {'rank': '93', 'Release Date': '11/22/2017', 'Movie': 'Coco', 'Production Budget': '$175,000,000', 'Domestic Gross': '$209,726,015', 'Worldwide Gross': '$800,373,772'}, {'rank': '94', 'Release Date': '3/27/2009', 'Movie': 'Monsters vs. Aliens', 'Production Budget': '$175,000,000', 'Domestic Gross': '$198,351,526', 'Worldwide Gross': '$381,687,380'}, {'rank': '95', 'Release Date': '8/7/2009', 'Movie': 'G.I. Joe: The Rise of Cobra', 'Production Budget': '$175,000,000', 'Domestic Gross': '$150,201,498', 'Worldwide Gross': '$302,469,017'}, {'rank': '96', 'Release Date': '6/30/1999', 'Movie': 'Wild Wild West', 'Production Budget': '$175,000,000', 'Domestic Gross': '$113,805,681', 'Worldwide Gross': '$221,229,335'}, {'rank': '97', 'Release Date': '8/1/2008', 'Movie': 'The Mummy: Tomb of the Dragon Emperor', 'Production Budget': '$175,000,000', 'Domestic Gross': '$102,491,776', 'Worldwide Gross': '$405,760,225'}, {'rank': '98', 'Release Date': '6/22/2007', 'Movie': 'Evan Almighty', 'Production Budget': '$175,000,000', 'Domestic Gross': '$100,289,690', 'Worldwide Gross': '$174,131,329'}, {'rank': '99', 'Release Date': '7/28/1995', 'Movie': 'Waterworld', 'Production Budget': '$175,000,000', 'Domestic Gross': '$88,246,220', 'Worldwide Gross': '$264,246,220'}, {'rank': '100', 'Release Date': '5/12/2017', 'Movie': 'King Arthur: Legend of the Sword', 'Production Budget': '$175,000,000', 'Domestic Gross': '$39,175,066', 'Worldwide Gross': '$140,012,608'}]
Pietro de Falco ответил: 12 мая 2018 в 04:16
мне нужно закодировать печать (заголовки, полные_результаты, строки)? Это результат: rank ', u'Release Date', u'Movie ', u'Production Budget', u'Domestic Gross ', u'Worldwide Gross'], [u'1 ', u'12 / 18 / 2009 ', u'Avatar', u '$ 425,000,000', u '$ 760,507,625', u '$ 2,783,450,595', u'2 ', u'5 / 20/2011', u'Pirates of the Caribbean: On Stranger Tides ', u "410 600 000 долларов США", "241 063 875 долларов США", "1 045 663 875", u'3 ', u'5 / 1/2015', u'Avengers: Age of Ultron ', u' $ 330,600,000 'и т. Д.
Ajax1234 ответил: 12 мая 2018 в 04:17
@PietrodeFalco просто print(rows)