~tomasgroth/openlp/remote-sync

« back to all changes in this revision

Viewing changes to openlp/plugins/songs/lib/songselect.py

  • Committer: Tomas Groth
  • Date: 2019-02-14 20:36:25 UTC
  • mfrom: (2733.1.112 openlp)
  • Revision ID: tomasgroth@yahoo.dk-20190214203625-vwiq7mxob8p9qnt8
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
###############################################################################
5
5
# OpenLP - Open Source Lyrics Projection                                      #
6
6
# --------------------------------------------------------------------------- #
7
 
# Copyright (c) 2008-2018 OpenLP Developers                                   #
 
7
# Copyright (c) 2008-2019 OpenLP Developers                                   #
8
8
# --------------------------------------------------------------------------- #
9
9
# This program is free software; you can redistribute it and/or modify it     #
10
10
# under the terms of the GNU General Public License as published by the Free  #
33
33
 
34
34
from bs4 import BeautifulSoup, NavigableString
35
35
 
36
 
from openlp.plugins.songs.lib import Song, Author, Topic, VerseType, clean_song
 
36
from openlp.plugins.songs.lib import VerseType, clean_song
 
37
from openlp.plugins.songs.lib.db import Song, Author, Topic
37
38
from openlp.plugins.songs.lib.openlyricsxml import SongXML
38
39
 
 
40
 
39
41
USER_AGENTS = [
40
42
    'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) '
41
43
    'Chrome/52.0.2743.116 Safari/537.36',
170
172
                    callback(song)
171
173
                songs.append(song)
172
174
                if len(songs) >= max_results:
 
175
                    self.run_search = False
173
176
                    break
174
177
            current_page += 1
175
178
        return songs