File tree 2 files changed +26
-2
lines changed
2 files changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -445,7 +445,9 @@ class Html:
445
445
#: (paroles.net, sweetslyrics.com, lacoccinelle.net)
446
446
merge_lines = partial (re .compile (r"</p>\s+<p[^>]*>(?!___)" ).sub , "\n " )
447
447
#: remove empty divs (lacoccinelle.net)
448
- remove_empty_divs = partial (re .compile (r"<div[^>]*>\s*</div>" ).sub , "" )
448
+ remove_empty_tags = partial (
449
+ re .compile (r"(<(div|span)[^>]*>\s*</\2>)" ).sub , ""
450
+ )
449
451
#: remove Google Ads tags (musica.com)
450
452
remove_aside = partial (re .compile ("<aside .+?</aside>" ).sub , "" )
451
453
#: remove adslot-Content_1 div from the lyrics text (paroles.net)
@@ -469,7 +471,7 @@ def remove_ads(cls, text: str) -> str:
469
471
470
472
@classmethod
471
473
def merge_paragraphs (cls , text : str ) -> str :
472
- return cls .merge_blocks (cls .merge_lines (cls .remove_empty_divs (text )))
474
+ return cls .merge_blocks (cls .merge_lines (cls .remove_empty_tags (text )))
473
475
474
476
475
477
class SoupMixin :
@@ -641,6 +643,7 @@ class Google(SearchBackend):
641
643
paroles(\ et\ traduction|\ de\ chanson)?
642
644
| letras?(\ de)?
643
645
| liedtexte
646
+ | dainų\ žodžiai
644
647
| original\ song\ full\ text\.
645
648
| official
646
649
| 20[12]\d\ version
Original file line number Diff line number Diff line change @@ -147,6 +147,27 @@ def backend(self) -> str:
147
147
""" ,
148
148
url_title = "The Beatles Lady Madonna lyrics" ,
149
149
),
150
+ LyricsPage .make (
151
+ "https://www.dainuzodziai.lt/m/mergaites-nori-mylet-atlanta/" ,
152
+ """
153
+ Jos nesuspėja skriet paskui vėją
154
+ Bangos į krantą grąžina jas vėl
155
+ Jos karštą saulę paliesti norėjo
156
+ Ant kranto palikę visas negandas
157
+
158
+ Bet jos nori mylėt
159
+ Jos nenori liūdėt
160
+ Leisk mergaitėms mylėt
161
+ Kaip jos moka mylėt
162
+ Koks vakaras šiltas ir nieko nestinga
163
+ Veidus apšviečia žaisminga šviesa
164
+ Jos buvo laimingos prie jūros kur liko
165
+ Tik vėjas išmokęs visas jų dainas
166
+ """ ,
167
+ artist = "Atlanta" ,
168
+ track_title = "Mergaitės Nori Mylėt" ,
169
+ url_title = "Mergaitės nori mylėt – Atlanta | Dainų Žodžiai" ,
170
+ ),
150
171
LyricsPage .make (
151
172
"https://genius.com/The-beatles-lady-madonna-lyrics" ,
152
173
"""
You can’t perform that action at this time.
0 commit comments