Skip to content

Commit

Permalink
Unescaped html data and tidied up test html files
Browse files Browse the repository at this point in the history
  • Loading branch information
snejus committed Jan 19, 2021
1 parent 41310d7 commit 14be671
Show file tree
Hide file tree
Showing 7 changed files with 190 additions and 6,808 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# [0.5.3] 2021-01-19

### Fixed
- For data that is parsed directly from the html, ampersands are now correctly
unescaped.


# [0.5.2] 2021-01-18

### Fixed
Expand Down
3 changes: 2 additions & 1 deletion beetsplug/bandcamp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import logging
import re
from html import unescape
from itertools import chain
from operator import truth
from typing import Any, Dict, Iterator, List, Optional, Sequence, Set
Expand Down Expand Up @@ -73,7 +74,7 @@ def _get(self, url: str) -> str:
except requests.exceptions.RequestException:
self._info("Error while fetching URL: {}", url)
return ""
return response.text
return unescape(response.text)


class BandcampAlbumArt(BandcampRequestsHandler, fetchart.RemoteArtSource):
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "beetcamp"
version = "0.5.2"
version = "0.5.3"
description = "Bandcamp autotagger source for beets (http://beets.io)."
authors = ["Šarūnas Nejus <[email protected]>"]
readme = "README.md"
Expand Down
1,679 changes: 46 additions & 1,633 deletions tests/album.html

Large diffs are not rendered by default.

2,155 changes: 46 additions & 2,109 deletions tests/compilation.html

Large diffs are not rendered by default.

1,341 changes: 47 additions & 1,294 deletions tests/single.html

Large diffs are not rendered by default.

1,811 changes: 41 additions & 1,770 deletions tests/track_alt.html

Large diffs are not rendered by default.

0 comments on commit 14be671

Please sign in to comment.