示例#1
0
    def test_url_02(self):
        url = 'http://www.songtexte.com/songtext/guns-n-roses/sweet-child-o-mine-33d0c849.html'
        obj = Lyric(url)
        obj.parse()

        self.assertEqual(obj.title, u"Sweet Child o' Mine")
        self.assertEqual(obj.artist, u'Guns N’ Roses')
        self.assertEqual(len(obj.lyric), 1123)
示例#2
0
    def test_url_03(self):
        url = 'http://www.songtexte.com/songtext/bone-thugs-n-harmony-feat-mariah-carey-and-bow-wow/c-town-6ba75a7e.html'
        obj = Lyric(url)
        obj.parse()

        self.assertEqual(obj.title, u"C-Town")
        self.assertEqual(obj.artist, u'Bone Thugs-n-Harmony feat. Mariah Carey & Bow Wow')
        self.assertEqual(len(obj.lyric), 2977)
示例#3
0
    def test_url_01(self):
        url = 'http://www.songtexte.com/songtext/taylor-swift/begin-again-63a6de47.html'
        obj = Lyric(url)
        obj.parse()

        self.assertEqual(obj.title, u'Begin Again')
        self.assertEqual(obj.artist, u'Taylor Swift')
        self.assertEqual(len(obj.lyric), 1618)