diff options
author | Cqoicebordel <Cqoicebordel@users.noreply.github.com> | 2015-01-26 18:24:08 +0100 |
---|---|---|
committer | Cqoicebordel <Cqoicebordel@users.noreply.github.com> | 2015-01-26 18:24:08 +0100 |
commit | 4dba3739fb3b98572cbd51adab226376b5844105 (patch) | |
tree | f9422c343c1f05193dad47113682a3e9599f4c84 /searx/engines/youtube.py | |
parent | 8f040e30adbbd615155a5075bec28ccadff10eff (diff) | |
download | searxng-4dba3739fb3b98572cbd51adab226376b5844105.tar.gz searxng-4dba3739fb3b98572cbd51adab226376b5844105.zip |
Youtube's unit test
Diffstat (limited to 'searx/engines/youtube.py')
-rw-r--r-- | searx/engines/youtube.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/searx/engines/youtube.py b/searx/engines/youtube.py index 59f07c574..1375538a8 100644 --- a/searx/engines/youtube.py +++ b/searx/engines/youtube.py @@ -57,7 +57,7 @@ def response(resp): url = [x['href'] for x in result['link'] if x['type'] == 'text/html'] if not url: - return + continue # remove tracking url = url[0].replace('feature=youtube_gdata', '') @@ -73,7 +73,7 @@ def response(resp): pubdate = result['published']['$t'] publishedDate = parser.parse(pubdate) - if result['media$group']['media$thumbnail']: + if 'media$thumbnail' in result['media$group']: thumbnail = result['media$group']['media$thumbnail'][0]['url'] content = result['content']['$t'] |