[docs]def_propose_df(self):max_iter=30dist_th=8.7col_dominant=[160,194,195]records=[]fortweetinself.tweets[:max_iter]:cond="media"intweet.entities# and len(tweet.full_text) < 30ifcond:url=tweet.extended_entities["media"][0]["media_url_https"]im=Image.open(requests.get(url,stream=True).raw,formats=["jpeg"])pixel_values=[xfori,xinenumerate(im.getdata())ifi<100000]h=pd.value_counts(pixel_values,normalize=True).index[0]dist=np.linalg.norm(np.array(h)-np.array(col_dominant))ifdist<dist_th:dt=clean_date(tweet.created_at)ifself.stop_search(dt):breakrecords.append({"date":dt,"text":tweet.full_text,"source_url":self.build_post_url(tweet.id),"media_url":url,})df=pd.DataFrame(records)returndf