diff options
| author | 2021-04-13 19:33:47 -0400 | |
|---|---|---|
| committer | 2021-04-13 19:33:47 -0400 | |
| commit | d27dcd4646242d6da8436f14c7b37ce864355858 (patch) | |
| tree | c5c86ca7435010b6b13933217a1921430cf95dc4 /gallery_dl/extractor/bcy.py | |
| parent | 3201d77a148367d739862b4f07868a76eaeb7cb1 (diff) | |
New upstream version 1.17.2.upstream/1.17.2
Diffstat (limited to 'gallery_dl/extractor/bcy.py')
| -rw-r--r-- | gallery_dl/extractor/bcy.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/gallery_dl/extractor/bcy.py b/gallery_dl/extractor/bcy.py index ec7020a..6e0003d 100644 --- a/gallery_dl/extractor/bcy.py +++ b/gallery_dl/extractor/bcy.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Mike Fährmann +# Copyright 2020-2021 Mike Fährmann # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as @@ -125,12 +125,15 @@ class BcyUserExtractor(BcyExtractor): while True: data = self.request(url, params=params).json() - item = None - for item in data["data"]["items"]: - yield item["item_detail"] - - if not item: + try: + items = data["data"]["items"] + except KeyError: + return + if not items: return + + for item in items: + yield item["item_detail"] params["since"] = item["since"] |
