Change param item "features" passed to Beautiful Soup to prevent false +ve warning in r353.

Change NotifyMyAndroid to its new web location.
This commit is contained in:
JackDandy 2015-06-15 13:48:01 +01:00
parent 23da0ad9ef
commit fbe05a21c2
3 changed files with 15 additions and 4 deletions

View file

@ -28,6 +28,7 @@
* Fix show list view when no shows exist and "Group show lists shows into" is set to anything other than "One Show List"
* Fix fault matching air by date shows by using correct episode/season strings in find search results
* Change add 'hevc', 'x265' and some langs to Config Search/Episode Search/Ignore result with any word
* Change NotifyMyAndroid to its new web location
* Update feedparser library 5.1.3 to 5.2.0 (8c62940)
* Remove feedcache implementation and library
* Add coverage testing and coveralls support
@ -45,7 +46,6 @@
* Update SimpleJSON library 2.0.9 to 3.7.3 (0bcdf20)
* Update xmltodict library 0.9.0 to 0.9.2 (579a005)
* Update dateutil library 2.2 to 2.4.2 (a6b8925)
* Change zoneinfo update/loader to be compatible with dateutil 2.4.2
* Update ConfigObj library 4.6.0 to 5.1.0 (a68530a)
* Update Beautiful Soup to 4.3.2 (r353)
@ -54,6 +54,8 @@
* Update Tornado webserver from 4.2.dev1 (609dbb9) to 4.2b1 (61a16c9)
* Change reload_module call to explicit import lib/six.moves
* Change queue, httplib, cookielib and xmlrpclib to use explicit import lib/six.moves
* Change zoneinfo update/loader to be compatible with dateutil 2.4.2
* Change param item "features" passed to Beautiful Soup to prevent false +ve warning in r353
### 0.9.1 (2015-05-25 03:03:00 UTC)

View file

@ -1159,7 +1159,7 @@
<div class="component-group">
<div class="component-group-desc">
<img class="notifier-icon" src="$sbRoot/images/notifiers/nma.png" alt="" title="NMA"/>
<h3><a href="<%= anon_url('http://nma.usk.bz') %>" rel="noreferrer" onclick="window.open(this.href, '_blank'); return false;">Notify My Android</a></h3>
<h3><a href="<%= anon_url('https://www.notifymyandroid.com') %>" rel="noreferrer" onclick="window.open(this.href, '_blank'); return false;">Notify My Android</a></h3>
<p>Notify My Android is a Prowl-like Android App and API that offers an easy way to send notifications from your application directly to your Android device.</p>
</div>
<fieldset class="component-group-list">

View file

@ -3,11 +3,20 @@ from bs4 import BeautifulSoup
class BS4Parser:
def __init__(self, *args, **kwargs):
self.soup = BeautifulSoup(*args, **kwargs)
# list type param of "feature" arg is not currently correctly tested by bs4 (r353)
# so for now, adjust param to provide possible values until the issue is addressed
kwargs_new = {}
for k, v in kwargs.items():
if 'features' in k and isinstance(v, list):
v = [item for item in v if item in ['html5lib', 'html.parser', 'html', 'lxml', 'xml']][0]
kwargs_new[k] = v
self.soup = BeautifulSoup(*args, **kwargs_new)
def __enter__(self):
return self.soup
def __exit__(self, exc_ty, exc_val, tb):
self.soup.clear(True)
self.soup = None
self.soup = None