diff --git a/ofscraper/actions/actions/download/normal/downloadnormal.py b/ofscraper/actions/actions/download/normal/downloadnormal.py index 0cc51d25..2ec8e766 100644 --- a/ofscraper/actions/actions/download/normal/downloadnormal.py +++ b/ofscraper/actions/actions/download/normal/downloadnormal.py @@ -63,7 +63,6 @@ async def process_dicts(username, model_id, medialist, posts): return log_text_array, (0, 0, 0, 0, 0) task1 = None with progress_utils.setup_download_progress_live(multi=False): - log = logging.getLogger("shared") try: aws = [] diff --git a/ofscraper/classes/media.py b/ofscraper/classes/media.py index 47be9549..1b424c80 100644 --- a/ofscraper/classes/media.py +++ b/ofscraper/classes/media.py @@ -372,8 +372,10 @@ def preview(self): @property def linked(self): - return (self.url or self.mpd)!=None - + return (self.url or self.mpd)is not None + @property + def link(self): + return self.url or self.mpd @property def media(self): return self._media diff --git a/ofscraper/db/operations_/media.py b/ofscraper/db/operations_/media.py index fce3dea5..f0c11b80 100644 --- a/ofscraper/db/operations_/media.py +++ b/ofscraper/db/operations_/media.py @@ -419,7 +419,7 @@ def write_media_table_via_api_batch(medias, model_id=None, conn=None, **kwargs) lambda media: [ media.id, media.postid, - media.url or media.mpd, + media.link, media.responsetype.capitalize(), media.mediatype.capitalize(), media.preview, @@ -447,7 +447,7 @@ def update_media_table_via_api_batch( lambda media: [ media.id, media.postid, - media.url or media.mpd, + media.link, media.linked, media.responsetype.capitalize(), media.mediatype.capitalize(), @@ -657,7 +657,8 @@ def update_media_table_via_api_helper( insertData = [ media.id, media.postid, - media.url or media.mpd, + media.link, + media.linked, media.responsetype.capitalize(), media.mediatype.capitalize(), media.preview,