pictuga / morss

Get full text RSS feeds
https://morss.it/
GNU Affero General Public License v3.0
621 stars 75 forks source link

MorrsException on links with a period in them #122

Open Quinten0508 opened 1 year ago

Quinten0508 commented 1 year ago

Morss does not handle links with periods in them as expected (example). Here's the full output:

A problem occurred in a Python script.  Here is the sequence of function calls leading up to the error, in the order they occurred.

/usr/lib/python3.11/site-packages/morss/wsgi.py in cgi_error_handler(environ={'HTTP_ACCEPT':   'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8',  'HTTP_ACCEPT_ENCODING': 'gzip, deflate', 'HTTP_ACCEPT_LANGUAGE':  'en-US,en;q=0.5', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE':  'language=en-US; grafana_session=f63af24fecfbd185...alive;  PHPSESSID=3842ded834118ad3998ee32f98e1aca3', 'HTTP_DNT': '1',  'HTTP_HOST': '192.168.1.31:8088', 'HTTP_REFERER':  'http://192.168.1.31:8088/', 'HTTP_UPGRADE_INSECURE_REQUESTS': '1',  'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0)  Gecko/20100101 Firefox/118.0', ...}, start_response=<bound method  Response.start_response of <gunicorn.http.wsgi.Response  object>>, app=<function  middleware.<locals>.app_builder.<locals>.app_wrap>)
--
246 def cgi_error_handler(environ, start_response, app):
247     try:
=>  248         return app(environ, start_response)
249
250     except (KeyboardInterrupt, SystemExit):
app = <function middleware.<locals>.app_builder.<locals>.app_wrap>, environ =  {'HTTP_ACCEPT':  'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8',  'HTTP_ACCEPT_ENCODING': 'gzip, deflate', 'HTTP_ACCEPT_LANGUAGE':  'en-US,en;q=0.5', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE':  'language=en-US; grafana_session=f63af24fecfbd185...alive;  PHPSESSID=3842ded834118ad3998ee32f98e1aca3', 'HTTP_DNT': '1',  'HTTP_HOST': '192.168.1.31:8088', 'HTTP_REFERER':  'http://192.168.1.31:8088/', 'HTTP_UPGRADE_INSECURE_REQUESTS': '1',  'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0)  Gecko/20100101 Firefox/118.0', ...}, start_response = <bound method Response.start_response of <gunicorn.http.wsgi.Response object>>

MorssException: Error downloading feed
<br><tt><small>     </small> </tt>add_note =
&lt;built-in method add_note of MorssException object&gt;
<br><tt><small>     </small> </tt>args =
('Error downloading feed',)
<br><tt><small>     </small> </tt>with_traceback =
&lt;built-in method with_traceback of MorssException object&gt;

A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
 [/usr/lib/python3.11/site-packages/morss/wsgi.py](file:///usr/lib/python3.11/site-packages/morss/wsgi.py) in cgi_error_handler(environ={'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'gzip, deflate', 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.5', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE': 'language=en-US; grafana_session=f63af24fecfbd185...alive; PHPSESSID=3842ded834118ad3998ee32f98e1aca3', 'HTTP_DNT': '1', 'HTTP_HOST': '192.168.1.31:8088', 'HTTP_REFERER': 'http://192.168.1.31:8088/', 'HTTP_UPGRADE_INSECURE_REQUESTS': '1', 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/118.0', ...}, start_response=<bound method Response.start_response of <gunicorn.http.wsgi.Response object>>, app=<function middleware.<locals>.app_builder.<locals>.app_wrap>)
    246 def cgi_error_handler(environ, start_response, app):
    247     try:
=>  248         return app(environ, start_response)
    249 
    250     except (KeyboardInterrupt, SystemExit):
app = <function middleware.<locals>.app_builder.<locals>.app_wrap>, environ = {'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'gzip, deflate', 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.5', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE': 'language=en-US; grafana_session=f63af24fecfbd185...alive; PHPSESSID=3842ded834118ad3998ee32f98e1aca3', 'HTTP_DNT': '1', 'HTTP_HOST': '192.168.1.31:8088', 'HTTP_REFERER': 'http://192.168.1.31:8088/', 'HTTP_UPGRADE_INSECURE_REQUESTS': '1', 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/118.0', ...}, start_response = <bound method Response.start_response of <gunicorn.http.wsgi.Response object>>
 [/usr/lib/python3.11/site-packages/morss/wsgi.py](file:///usr/lib/python3.11/site-packages/morss/wsgi.py) in app_wrap(environ={'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'gzip, deflate', 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.5', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE': 'language=en-US; grafana_session=f63af24fecfbd185...alive; PHPSESSID=3842ded834118ad3998ee32f98e1aca3', 'HTTP_DNT': '1', 'HTTP_HOST': '192.168.1.31:8088', 'HTTP_REFERER': 'http://192.168.1.31:8088/', 'HTTP_UPGRADE_INSECURE_REQUESTS': '1', 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/118.0', ...}, start_response=<bound method Response.start_response of <gunicorn.http.wsgi.Response object>>)
    151             # This is called when a http request is being processed
    152 
=>  153             return func(environ, start_response, app)
    154 
    155         return app_wrap
func = <function cgi_dispatcher>, environ = {'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'gzip, deflate', 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.5', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE': 'language=en-US; grafana_session=f63af24fecfbd185...alive; PHPSESSID=3842ded834118ad3998ee32f98e1aca3', 'HTTP_DNT': '1', 'HTTP_HOST': '192.168.1.31:8088', 'HTTP_REFERER': 'http://192.168.1.31:8088/', 'HTTP_UPGRADE_INSECURE_REQUESTS': '1', 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/118.0', ...}, start_response = <bound method Response.start_response of <gunicorn.http.wsgi.Response object>>, app = <function middleware.<locals>.app_builder.<locals>.app_wrap>
 [/usr/lib/python3.11/site-packages/morss/wsgi.py](file:///usr/lib/python3.11/site-packages/morss/wsgi.py) in cgi_dispatcher(environ={'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'gzip, deflate', 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.5', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE': 'language=en-US; grafana_session=f63af24fecfbd185...alive; PHPSESSID=3842ded834118ad3998ee32f98e1aca3', 'HTTP_DNT': '1', 'HTTP_HOST': '192.168.1.31:8088', 'HTTP_REFERER': 'http://192.168.1.31:8088/', 'HTTP_UPGRADE_INSECURE_REQUESTS': '1', 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/118.0', ...}, start_response=<bound method Response.start_response of <gunicorn.http.wsgi.Response object>>, app=<function middleware.<locals>.app_builder.<locals>.app_wrap>)
    240             return dispatch_table[key](environ, start_response)
    241 
=>  242     return app(environ, start_response)
    243 
    244 
app = <function middleware.<locals>.app_builder.<locals>.app_wrap>, environ = {'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'gzip, deflate', 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.5', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE': 'language=en-US; grafana_session=f63af24fecfbd185...alive; PHPSESSID=3842ded834118ad3998ee32f98e1aca3', 'HTTP_DNT': '1', 'HTTP_HOST': '192.168.1.31:8088', 'HTTP_REFERER': 'http://192.168.1.31:8088/', 'HTTP_UPGRADE_INSECURE_REQUESTS': '1', 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/118.0', ...}, start_response = <bound method Response.start_response of <gunicorn.http.wsgi.Response object>>
 [/usr/lib/python3.11/site-packages/morss/wsgi.py](file:///usr/lib/python3.11/site-packages/morss/wsgi.py) in app_wrap(environ={'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'gzip, deflate', 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.5', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE': 'language=en-US; grafana_session=f63af24fecfbd185...alive; PHPSESSID=3842ded834118ad3998ee32f98e1aca3', 'HTTP_DNT': '1', 'HTTP_HOST': '192.168.1.31:8088', 'HTTP_REFERER': 'http://192.168.1.31:8088/', 'HTTP_UPGRADE_INSECURE_REQUESTS': '1', 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/118.0', ...}, start_response=<bound method Response.start_response of <gunicorn.http.wsgi.Response object>>)
    151             # This is called when a http request is being processed
    152 
=>  153             return func(environ, start_response, app)
    154 
    155         return app_wrap
func = <function cgi_file_handler>, environ = {'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'gzip, deflate', 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.5', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE': 'language=en-US; grafana_session=f63af24fecfbd185...alive; PHPSESSID=3842ded834118ad3998ee32f98e1aca3', 'HTTP_DNT': '1', 'HTTP_HOST': '192.168.1.31:8088', 'HTTP_REFERER': 'http://192.168.1.31:8088/', 'HTTP_UPGRADE_INSECURE_REQUESTS': '1', 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/118.0', ...}, start_response = <bound method Response.start_response of <gunicorn.http.wsgi.Response object>>, app = <function cgi_app>
 [/usr/lib/python3.11/site-packages/morss/wsgi.py](file:///usr/lib/python3.11/site-packages/morss/wsgi.py) in cgi_file_handler(environ={'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'gzip, deflate', 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.5', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE': 'language=en-US; grafana_session=f63af24fecfbd185...alive; PHPSESSID=3842ded834118ad3998ee32f98e1aca3', 'HTTP_DNT': '1', 'HTTP_HOST': '192.168.1.31:8088', 'HTTP_REFERER': 'http://192.168.1.31:8088/', 'HTTP_UPGRADE_INSECURE_REQUESTS': '1', 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/118.0', ...}, start_response=<bound method Response.start_response of <gunicorn.http.wsgi.Response object>>, app=<function cgi_app>)
    186 
    187     # regex didn't validate or no file found
=>  188     return app(environ, start_response)
    189 
    190 
app = <function cgi_app>, environ = {'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'gzip, deflate', 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.5', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE': 'language=en-US; grafana_session=f63af24fecfbd185...alive; PHPSESSID=3842ded834118ad3998ee32f98e1aca3', 'HTTP_DNT': '1', 'HTTP_HOST': '192.168.1.31:8088', 'HTTP_REFERER': 'http://192.168.1.31:8088/', 'HTTP_UPGRADE_INSECURE_REQUESTS': '1', 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/118.0', ...}, start_response = <bound method Response.start_response of <gunicorn.http.wsgi.Response object>>
 [/usr/lib/python3.11/site-packages/morss/wsgi.py](file:///usr/lib/python3.11/site-packages/morss/wsgi.py) in cgi_app(environ={'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'gzip, deflate', 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.5', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE': 'language=en-US; grafana_session=f63af24fecfbd185...alive; PHPSESSID=3842ded834118ad3998ee32f98e1aca3', 'HTTP_DNT': '1', 'HTTP_HOST': '192.168.1.31:8088', 'HTTP_REFERER': 'http://192.168.1.31:8088/', 'HTTP_UPGRADE_INSECURE_REQUESTS': '1', 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/118.0', ...}, start_response=<bound method Response.start_response of <gunicorn.http.wsgi.Response object>>)
    127 
    128     # get the work done
=>  129     url, rss = FeedFetch(url, options)
    130 
    131     start_response(headers['status'], list(headers.items()))
url = 'www.nature.com/nphys', rss undefined, global FeedFetch = <function FeedFetch>, options = <morss.morss.Options object>
 [/usr/lib/python3.11/site-packages/morss/morss.py](file:///usr/lib/python3.11/site-packages/morss/morss.py) in FeedFetch(url='www.nature.com/nphys', options=<morss.morss.Options object>)
    280 
    281     except (IOError, HTTPException):
=>  282         raise MorssException('Error downloading feed')
    283 
    284     if options.items:
global MorssException = <class 'morss.morss.MorssException'>

MorssException: Error downloading feed
      add_note = <built-in method add_note of MorssException object>
      args = ('Error downloading feed',)
      with_traceback = <built-in method with_traceback of MorssException object>