File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -198,7 +198,11 @@ def info(link: str):
198198 details ['title' ] = soup .find ("div" , class_ = "col-lg-8 col-md-8 col-rightx" ).find ('h1' , class_ = 'film-title' ).text
199199 mainbox = soup .find ("div" , class_ = "col-lg-8 col-md-8 col-rightx" ).find ('div' , class_ = 'box-body' )
200200 details ['thumbnail' ] = mainbox .find ("img" , class_ = "img-responsive" )['src' ]
201- details ['synopsis' ] = mainbox .find ("div" , class_ = 'show-synopsis' ).find ('span' ).text .replace ('\n ' , ' ' )
201+ details ['synopsis' ] = mainbox .find ("div" , class_ = 'show-synopsis' ).find ('span' )
202+ if details ['synopsis' ]:
203+ details ['synopsis' ] = details ['synopsis' ].text .replace ('\n ' , ' ' )
204+ else :
205+ details ['synopsis' ] = ''
202206
203207 # Finding Ratings
204208 details ['ratings' ] = mainbox .find ("div" , class_ = "hfs" , itempropx = "aggregateRating" )
You can’t perform that action at this time.
0 commit comments