You need to select tr, loop through it and find all td for every tr
from bs4 import BeautifulSoup
import requests
url='https://www.boxofficemojo.com/year/world/'
headers={'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.105 Safari/537.36'}
movies=[]
def get_data():
r=requests.get(url,headers)
soup=BeautifulSoup(r.content,'html.parser')
for i in soup.findAll('tr'):
row_data=[j.text.strip() for j in i.find_all("td")]
movies.append(row_data)
return movies
print(get_data())
Output:
[[], ['1', 'Bad Boys for Life', '$419,074,646', '$204,417,855', '48.8%', '$214,656,791', '51.2%'], ['2', 'Sonic the Hedgehog', '$306,766,470', '$146,066,470', '47.6%', '$160,700,000', '52.4%'], ['3', 'Dolittle', '$238,091,780', '$77,047,065', '32.4%', '$161,044,715', '67.6%'], ['4', 'Harley Quinn: Birds of Prey', '$201,858,461', '$84,158,461', '41.7%', '$117,700,000', '58.3%'], ['5', 'The Invisible Man', '$130,195,571', '$64,914,050', '49.9%', '$65,281,521', '50.1%'], ['6', 'Onward', '$110,847,927', '$61,555,145', '55.5%', '$49,292,782', '44.5%'], ['7', 'The Call of the Wild', '$107,604,626', '$62,342,368', '57.9%', '$45,262,258', '42.1%'], ['8', 'Fantasy Island', '$47,315,959', '$26,441,782', '55.9%', '$20,874,177', '44.1%'], ['9', 'Underwater', '$40,882,928', '$17,291,078', '42.3%', '$23,591,850', '57.7%'], ['10', 'The Man Standing Next', '$34,664,900', '$113,527', '0.3%', '$34,551,373', '99.7%'], ['11', 'Bloodshot', '$30,822,350', '$10,021,787', '32.5%', '$20,800,563', '67.5%'], ['12', 'Like a Boss', '$29,753,143', '$22,169,514', '74.5%', '$7,583,629', '25.5%'], ['13', 'Peninsula', '$28,319,526', '-', '-', '$28,319,526', '100%'], ['14', 'Emma.', '$25,600,510', '$10,055,355', '39.3%', '$15,545,155', '60.7%'], ['15', 'Gretel & Hansel', '$21,676,865', '$15,347,654', '70.8%', '$6,329,211', '29.2%'], ['16', 'The Photograph', '$20,690,779', '$20,578,185', '99.5%', '$112,594', '0.5%'], ['17', 'Brahms: The Boy II', '$20,311,536', '$12,611,536', '62.1%', '$7,700,000', '37.9%'], ['18', 'The Turning', '$18,594,352', '$15,472,775', '83.2%', '$3,121,577', '16.8%'], ['19', 'Baaghi 3', '$16,721,280', '$721,439', '4.3%', '$15,999,841', '95.7%'], ['20', 'The Way Back', '$14,690,514', '$13,590,514', '92.5%', '$1,100,000', '7.5%'], ['21', 'I Still Believe', '$11,627,752', '$9,868,521', '84.9%', '$1,759,231', '15.1%'], ['22', 'Impractical Jokers: The Movie', '$10,691,091', '$10,691,091', '100%', '-', '-'], ['23', 'Scoob!', '$9,944,658', '-', '-', '$9,944,658', '100%'], ['24', 'The Personal History of David Copperfield', '$9,472,538', '-', '-', '$9,472,538', '100%'], ['25', 'The Hunt', '$8,935,772', '$5,812,500', '65%', '$3,123,272', '35%'], ['26', 'Downhill', '$8,899,195', '$8,287,061', '93.1%', '$612,134', '6.9%'], ['27', 'Malang', '$8,394,609', '-', '-', '$8,394,609', '100%'], ['28', 'Trolls World Tour', '$8,356,781', '-', '-', '$8,356,781', '100%'], ['29', 'Chhapaak', '$6,532,100', '$604,334', '9.3%', '$5,927,766', '90.7%'], ['30', 'Las Pildoras De Mi Novio', '$6,292,780', '$2,971,116', '47.2%', '$3,321,664', '52.8%'], ['31', 'The Rhythm Section', '$5,989,583', '$5,437,971', '90.8%', '$551,612', '9.2%'], ['32', 'My Spy', '$5,804,624', '-', '-', '$5,804,624', '100%'], ['33', 'The Real Exorcist', '$5,035,830', '-', '-', '$5,035,830', '100%'], ['34', 'Panga', '$4,886,124', '$582,720', '11.9%', '$4,303,404', '88.1%'], ['35', 'Digimon Adventure: Last Evolution Kizuna', '$3,966,107', '-', '-', '$3,966,107', '100%'], ['36', 'Military Wives', '$3,658,654', '-', '-', '$3,658,654', '100%'], ['37', 'The Last Full Measure', '$3,364,657', '$2,949,212', '87.7%', '$415,445', '12.3%'], ['38', '2020 Oscar Nominated Short Films', '$3,306,611', '$3,306,611', '100%', '-', '-'], ['39', 'The Lodge', '$3,153,107', '$2,138,907', '67.8%', '$1,014,200', '32.2%'], ['40', 'The Wretched', '$2,923,826', '$1,798,250', '61.5%', '$1,125,576', '38.5%'], ['41', 'Samsam', '$2,901,387', '-', '-', '$2,901,387', '100%'], ['42', 'The King of Staten Island', '$1,517,450', '-', '-', '$1,517,450', '100%'], ['43', 'Unhinged', '$1,490,411', '-', '-', '$1,490,411', '100%'], ['44', 'The High Note', '$1,465,941', '-', '-', '$1,465,941', '100%'], ['45', 'Greed', '$1,458,442', '$355,308', '24.4%', '$1,103,134', '75.6%'], ['46', 'Sarileru Neekevvaru', '$1,366,335', '$821,000', '60.1%', '$545,335', '39.9%'], ['47', 'The Assistant', '$1,296,090', '$1,100,313', '84.9%', '$195,777', '15.1%'], ['48', 'The Rental', '$1,239,341', '$1,054,732', '85.1%', '$184,609', '14.9%'], ['49', 'Relic', '$1,082,966', '$1,002,602', '92.6%', '$80,364', '7.4%'], ['50', 'Chal Mera Putt 2', '$1,070,997', '$445,000', '41.6%', '$625,997', '58.4%'], ['51', 'Color Out of Space', '$1,002,270', '$765,561', '76.4%', '$236,709', '23.6%'], ['52', 'Becky', '$951,618', '$937,802', '98.5%', '$13,816', '1.5%'], ['53', 'Jurassic Park 2020 Re-release', '$939,524', '$858,600', '91.4%', '$80,924', '8.6%'], ['54', 'Riverdance 25th Anniversary Show', '$919,732', '$81,879', '8.9%', '$837,853', '91.1%'], ['55', 'Mafia Inc', '$889,863', '$889,863', '100%', '-', '-'], ['56', 'Star Wars: Episode V - The Empire Strikes Back 2020 Re-release', '$875,234', '$611,000', '69.8%', '$264,234', '30.2%'], ['57', 'The Outpost', '$873,201', '-', '-', '$873,201', '100%'], ['58', 'Misbehaviour', '$785,419', '-', '-', '$785,419', '100%'], ['59', 'Patterns of Evidence: The Red Sea Miracle', '$696,191', '$696,191', '100%', '-', '-'], ['60', 'Jaws 2020 Re-release', '$656,367', '$656,300', '100%', '$67', '<0.1%'], ['61', 'Seberg', '$585,845', '$434,702', '74.2%', '$151,143', '25.8%'], ['62', 'Followed', '$537,691', '$537,691', '100%', '-', '-'], ['63', 'Ghostbusters 2020 Re-release', '$515,829', '$500,000', '96.9%', '$15,829', '3.1%'], ['64', 'True History of the Kelly Gang', '$467,198', '$33,817', '7.2%', '$433,381', '92.8%'], ['65', 'Once Were Brothers: Robbie Robertson and the Band', '$453,506', '$449,561', '99.1%', '$3,945', '0.9%'], ['66', 'CatVideoFest 2020', '$437,625', '$437,625', '100%', '-', '-'], ['67', 'Infamous', '$429,148', '$429,148', '100%', '-', '-'], ['68', 'The Big Ugly', '$375,842', '$374,550', '99.7%', '$1,292', '0.3%'], ['69', 'Black Panther 2020 Re-release', '$367,000', '$367,000', '100%', '-', '-'], ['70', 'Inside Out 2020 Re-release', '$340,000', '$340,000', '100%', '-', '-'], ['71', 'The Perfect Candidate', '$332,172', '-', '-', '$332,172', '100%'], ['72', 'Burden', '$327,838', '$139,270', '42.5%', '$188,568', '57.5%'], ['73', 'Created Equal: Clarence Thomas in His Own Words', '$282,149', '$282,149', '100%', '-', '-'], ['74', 'Swallow', '$274,259', '$33,419', '12.2%', '$240,840', '87.8%'], ['75', 'The Burnt Orange Heresy', '$272,412', '$39,893', '14.6%', '$232,519', '85.4%'], ['76', 'An American in Paris 2020 Re-release', '$267,824', '$267,824', '100%', '-', '-'], ['77', 'Resistance', '$266,576', '$7,464', '2.8%', '$259,112', '97.2%'], ['78', 'The Secret: Dare to Dream', '$264,720', '-', '-', '$264,720', '100%'], ['79', 'Tokyo Godfathers 2020 Re-release', '$237,571', '$237,571', '100%', '-', '-'], ['80', 'Blind Eyes Opened', '$234,505', '$234,505', '100%', '-', '-'], ['81', 'Back to the Future 2020 Re-release', '$233,054', '$107,000', '45.9%', '$126,054', '54.1%'], ['82', 'The Trip to Greece', '$232,640', '$8,340', '3.6%', '$224,300', '96.4%'], ['83', 'Doctor Who Live Q&A And Screening', '$228,615', '$228,615', '100%', '-', '-'], ['84', 'National Theater Live: Cyrano de Bergerac', '$198,352', '$198,352', '100%', '-', '-'], ['85', 'The Doors: Break On Thru - A Celebration Of Ray Manzarek', '$190,160', '$190,160', '100%', '-', '-'], ['86', 'Palm Springs', '$164,000', '$164,000', '100%', '-', '-'], ['87', 'Cruel Peter', '$163,925', '-', '-', '$163,925', '100%'], ['88', 'The Climb', '$161,635', '-', '-', '$161,635', '100%'], ['89', 'Love Story 50th Anniversary', '$153,504', '$153,504', '100%', '-', '-'], ['90', 'The Booksellers', '$152,400', '$25,694', '16.9%', '$126,706', '83.1%'], ['91', 'Wendy', '$144,166', '$143,518', '99.6%', '$648', '0.4%'], ['92', 'Incitement', '$140,306', '$140,306', '100%', '-', '-'], ['93', 'We Summon the Darkness', '$140,105', '$60,794', '43.4%', '$79,311', '56.6%'], ['94', 'Gremlins 2020 Re-release', '$140,000', '$140,000', '100%', '-', '-'], ['95', 'Archive', '$139,593', '$139,593', '100%', '-', '-'], ['96', 'Most Wanted', '$138,000', '$138,000', '100%', '-', '-'], ['97', 'Babyteeth', '$137,559', '$4,507', '3.3%', '$133,052', '96.7%'], ['98', 'Beneath Us', '$137,260', '$137,260', '100%', '-', '-'], ['99', 'The Times of Bill Cunningham', '$134,288', '$134,288', '100%', '-', '-'], ['100', 'Only', '$125,603', '-', '-', '$125,603', '100%'], ['101', 'Hope Gap', '$124,411', '$104,732', '84.2%', '$19,679', '15.8%'], ['102', '14 Days, 12 Nights', '$122,806', '$122,530', '99.8%', '$276', '0.2%'], ['103', 'Come to Daddy', '$116,930', '$96,713', '82.7%', '$20,217', '17.3%'], ['104', 'Black Water: Abyss', '$107,753', '-', '-', '$107,753', '100%'], ['105', 'Lucky Grandma', '$102,000', '$102,000', '100%', '-', '-'], ['106', 'First Cow', '$101,068', '$101,068', '100%', '-', '-'], ['107', 'First Lady', '$93,298', '$93,298', '100%', '-', '-'], ['108', 'Miss Juneteenth', '$92,349', '$92,349', '100%', '-', '-'], ['109', 'Irresistible', '$90,557', '-', '-', '$90,557', '100%'], ['110', 'Never Rarely Sometimes Always', '$88,716', '$16,565', '18.7%', '$72,151', '81.3%'], ['111', 'Greenland', '$73,112', '-', '-', '$73,112', '100%'], ['112', 'Come and See 2020 Re-release', '$71,909', '$71,909', '100%', '-', '-'], ['113', 'How to Build a Girl', '$70,632', '$70,632', '100%', '-', '-'], ['114', "Nick Mason's Saucerful of Secrets: Live at the Roundhouse", '$69,967', '$32,444', '46.4%', '$37,523', '53.6%'], ['115', 'Shirley', '$68,920', '-', '-', '$68,920', '100%'], ['116', 'Saint Frances', '$59,257', '$44,330', '74.8%', '$14,927', '25.2%'], ['117', 'Summerland', '$59,000', '$38,335', '65%', '$20,665', '35%'], ['118', 'Young Ahmed Domestic', '$57,883', '$21,291', '36.8%', '$36,592', '63.2%'], ['119', 'A Simple Wedding', '$54,415', '$54,415', '100%', '-', '-'], ['120', 'Miss Fisher and the Crypt of Tears (special screenings)', '$51,158', '$51,032', '99.8%', '$126', '0.2%'], ['121', 'VHYes', '$47,037', '$47,037', '100%', '-', '-'], ['122', 'Enter the Fat Dragon', '$46,855', '$46,855', '100%', '-', '-'], ['123', 'Three Christs', '$36,723', '$36,723', '100%', '-', '-'], ['124', 'Tread', '$36,527', '$36,527', '100%', '-', '-'], ['125', 'Waiting for Anya', '$36,404', '-', '-', '$36,404', '100%'], ['126', 'Made in Italy', '$32,567', '-', '-', '$32,567', '100%'], ['127', 'Max Winslow and the House of Secrets', '$31,250', '$31,250', '100%', '-', '-'], ['128', 'After Parkland', '$30,444', '$30,444', '100%', '-', '-'], ['129', 'Olympic Dreams', '$29,450', '$29,450', '100%', '-', '-'], ['130', 'Buffaloed', '$29,118', '$29,118', '100%', '-', '-'], ['131', 'Abe', '$28,657', '-', '-', '$28,657', '100%'], ['132', 'Cane River 2020 Re-release', '$27,317', '$27,317', '100%', '-', '-'], ['133', 'José', '$26,563', '$26,563', '100%', '-', '-'], ['134', 'Unsubscribe', '$25,488', '$25,488', '100%', '-', '-'], ['135', 'Disappearance at Clifton Hill', '$25,084', '$25,084', '100%', '-', '-'], ['136', 'Stage Mother', '$24,736', '-', '-', '$24,736', '100%'], ['137', 'Heart of Africa', '$24,139', '$24,139', '100%', '-', '-'], ['138', 'Phoenix, Oregon', '$23,613', '$23,613', '100%', '-', '-'], ['139', 'Premature', '$23,071', '$23,071', '100%', '-', '-'], ['140', "L'Innocente", '$22,549', '$22,549', '100%', '-', '-'], ['141', 'Never Too Late', '$21,915', '-', '-', '$21,915', '100%'], ['142', 'Lore', '$20,006', '$20,006', '100%', '-', '-'], ['143', 'The Shining 40th Anniversary', '$19,024', '-', '-', '$19,024', '100%'], ['144', 'Pandora and the Flying Dutchman 2020 Re-release', '$17,401', '$17,401', '100%', '-', '-'], ['145', 'Made in Hong Kong', '$17,255', '$17,255', '100%', '-', '-'], ['146', 'Advocate', '$16,942', '$16,942', '100%', '-', '-'], ['147', 'Straight Up', '$16,080', '$16,080', '100%', '-', '-'], ['148', 'I Was at Home, But...', '$14,078', '$14,078', '100%', '-', '-'], ['149', 'Powerbomb', '$11,319', '$11,319', '100%', '-', '-'], ['150', 'Lost in America', '$11,301', '$11,301', '100%', '-', '-'], ['151', 'You Go to My Head', '$10,682', '$10,682', '100%', '-', '-'], ['152', 'Inception 10th Anniversary re-release', '$10,539', '-', '-', '$10,539', '100%'], ['153', 'Foosballers', '$9,966', '$9,966', '100%', '-', '-'], ['154', 'Just One More Kiss', '$9,130', '$9,130', '100%', '-', '-'], ['155', 'Juvenile Delinquents', '$8,946', '$6,312', '70.6%', '$2,634', '29.4%'], ['156', 'Inside the Rain', '$8,140', '$8,140', '100%', '-', '-'], ['157', 'The Wave', '$8,101', '$8,101', '100%', '-', '-'], ['158', 'The Grizzlies', '$6,754', '$6,754', '100%', '-', '-'], ['159', 'Human Capital', '$6,596', '$6,596', '100%', '-', '-'], ['160', 'Afterward', '$6,477', '$6,477', '100%', '-', '-'], ['161', 'The Other Lamb', '$6,187', '$6,024', '97.4%', '$163', '2.6%'], ['162', 'Guest Artist', '$5,906', '$5,906', '100%', '-', '-'], ['163', 'I AM PATRICK', '$5,838', '-', '-', '$5,838', '100%'], ['164', 'Killer Raccoons 2: Dark Christmas in the Dark', '$4,476', '$4,476', '100%', '-', '-'], ['165', "King's Gambit", '$3,816', '$3,816', '100%', '-', '-'], ['166', 'The Roads Not Taken', '$3,518', '$3,518', '100%', '-', '-'], ['167', 'Sex and the Future', '$3,101', '$3,101', '100%', '-', '-'], ['168', 'Valley Girl', '$3,080', '-', '-', '$3,080', '100%'], ['169', 'What We Found', '$2,720', '$2,720', '100%', '-', '-'], ['170', 'Moondance', '$2,371', '$2,371', '100%', '-', '-'], ['171', 'Detective Chinatown 3', '$2,342', '-', '-', '$2,342', '100%'], ['172', 'Goldie', '$2,302', '$2,302', '100%', '-', '-'], ['173', 'Gul Makai', '$2,035', '-', '-', '$2,035', '100%'], ['174', 'The Fox Hunter', '$1,577', '$1,577', '100%', '-', '-'], ['175', 'Hai Tang Hong', '$1,107', '$1,107', '100%', '-', '-'], ['176', 'The Transcendents', '$1,090', '$1,090', '100%', '-', '-'], ['177', 'Spaceship Earth', '$168', '-', '-', '$168', '100%']]