Example #1
0
    def set_slyp(self):
        a = Article(self.raw_url)
        a.download()
        a.parse()
        a.nlp()

        self.url = a.url.split('?')[0] if 'youtube' not in a.site_name else a.url
        self.raw_url = a.url
        self.slyp_type = 'video' if a.is_video() else 'article'
        self.title = a.title
        self.author = a.author
        self.date = a.publish_date
        self.text = a.text
        self.summary = a.summary
        self.description = a.description
        self.top_image = a.top_image
        self.site_name = a.site_name
        self.has_video = a.has_video()
        self.video_url = a.video_url
        self.keywords = a.keywords