diff --git a/.github/workflows/upload-on-tag.yaml b/.github/workflows/upload-on-tag.yaml index 542f47fe..fabaedce 100644 --- a/.github/workflows/upload-on-tag.yaml +++ b/.github/workflows/upload-on-tag.yaml @@ -25,7 +25,7 @@ jobs: import re with open("buildVars.py", 'r+', encoding='utf-8') as f: text = f.read() - text = re.sub("\"addon_version\" : ", "\"addon_version\" : \"${{ github.ref }}\"", text) + text = re.sub("\"addon_version\" : ", "\"addon_version\" : \"${{ github.ref }}.split("/")[-1]\"", text) f.seek(0) f.write(text) f.truncate() diff --git a/addon/globalPlugins/readFeeds/__init__.py b/addon/globalPlugins/readFeeds/__init__.py index 0d5a2c25..a2c91b29 100644 --- a/addon/globalPlugins/readFeeds/__init__.py +++ b/addon/globalPlugins/readFeeds/__init__.py @@ -618,10 +618,13 @@ def getArticleTimestamp(self, article): return 0 def refresh(self): - userAgent = "UniversalFeedParser/3.3 +http://feedparser.org/" - headers = {'User-Agent': userAgent} - req = urllib.request.Request(self._url, None, headers) - response = urllib.request.urlopen(req) + try: + response = urllib.request.urlopen(self._url) + except Exception: + userAgent = "UniversalFeedParser/3.3 +http://feedparser.org/" + headers = {'User-Agent': userAgent} + req = urllib.request.Request(self._url, None, headers) + response = urllib.request.urlopen(req) try: self._document = ElementTree.parse(response) except Exception as e: diff --git a/changelog.md b/changelog.md index 86e45f49..fce27d0a 100644 --- a/changelog.md +++ b/changelog.md @@ -1,9 +1 @@ -## Changes for 10.0 ## - -* Added a button to open the selected feed as HTML in the default web browser. -* If a new feed cannot be created, this will be notified in an error dialog. -* Improved order and presentation of some articles. -* More feeds may be supported. -* When the feeds dialog is opened, the list of feeds will be focused instead of the search edit box. -* You can choose if the search edit box is placed after the list of feeds, useful to focus the list event when switching from another window without closing the Feeds dialog. -* Added a button to copy the feed address to clipboard from the feeds dialog. +* Read feeds providing a user agent just as a fallback. diff --git a/scons.bat b/scons.bat new file mode 100644 index 00000000..a89463c7 --- /dev/null +++ b/scons.bat @@ -0,0 +1 @@ +scons \ No newline at end of file