mirror of
https://github.com/beetbox/beets.git
synced 2025-12-15 21:14:19 +01:00
print google sources url
when releasing a beets version, run the script before running test_lyrics.py, and copy/paste the sources listed on stdout as a bulk add on Google CSE so beets engine is up-to-date.
This commit is contained in:
parent
759f8224cc
commit
c69ad5d243
1 changed files with 1 additions and 1 deletions
|
|
@ -43,12 +43,12 @@ def main(argv=None):
|
|||
argv = sys.argv
|
||||
|
||||
for s in test_lyrics.GOOGLE_SOURCES + test_lyrics.DEFAULT_SOURCES:
|
||||
print 'Fetching sample from %s' % s['url']
|
||||
url = s['url'] + s['path']
|
||||
fn = test_lyrics.url_to_filename(url)
|
||||
if not os.path.isfile(fn):
|
||||
html = requests.get(url).text
|
||||
with safe_open_w(fn) as f:
|
||||
print 'Writing %s' % fn
|
||||
f.write(html.encode('utf8'))
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
|
|||
Loading…
Reference in a new issue