areas = []
for line_feature in line_layer.getFeatures():
for area_featurecands in= area_layer.getFeatures(QgsFeatureRequest().setFilterRect(line_feature.geometry().boundingBox()))
for area_feature in cands:
if line_feature.geometry().intersects(area_feature.geometry()):
areas.append(area_feature.id())
area_layer.select(areas)
If polyline geometry is complex filtering the area feature by the bounding box of the polyline may increase the perfomance. See link provided by @juls.