Avnsx / fansly-downloader

Easy to use fansly.com content downloading tool. Written in python, but ships as a standalone Executable App for Windows too. Enjoy your Fansly content offline anytime, anywhere in the highest possible content resolution! Fully customizable to download in bulk or single: photos, videos & audio from timeline, messages, collection & specific posts 👍
https://fansly.com/
GNU General Public License v3.0
1.27k stars 64 forks source link

Bug with message scraper in 0.4 #90

Closed BobafettX closed 1 year ago

BobafettX commented 1 year ago

I'm using 0.4 with python. I get the following error from the messages scraper and I haven't unlocked the most recent video, which led me to assume that was the issue. Other creators messages work and timeline works for that creator.

Traceback (most recent call last):
  File "G:\fansly-main\Fansly_Downloader.py", line 1085, in <module>
    contained_posts += [parse_media_info(obj)]
                        ^^^^^^^^^^^^^^^^^^^^^
  File "G:\fansly-main\Fansly_Downloader.py", line 718, in parse_media_info
    if all([default_normal_height, highest_variants_resolution_height, default_normal_height > highest_variants_resolution_height]):
                                                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: '>' not supported between instances of 'NoneType' and 'int'
Avnsx commented 1 year ago

Oops, switch:

if all([default_normal_height, highest_variants_resolution_height, default_normal_height > highest_variants_resolution_height]):

to

if all([default_normal_height, highest_variants_resolution_height]) and default_normal_height > highest_variants_resolution_height:

and let me know if that solves the issue

BobafettX commented 1 year ago

That didn't work, but I tried splitting into two ifs which while inelegant worked:

if all([default_normal_height is not None, highest_variants_resolution_height is not None]):
    if default_normal_height > highest_variants_resolution_height:
Avnsx commented 1 year ago

Well you could also just add or 0 to https://github.com/Avnsx/Fansly-Downloader-App/blob/4f228acf52390ac2254302ef7aba2c1595d16316/Fansly_Downloader.py#L653 So that it gets set to 0 if None, that's also going to fix it default_normal_height = default_details['height'] or 0 Same counts for every other spot I wrote ['height']

I'm going to publish a fix for this soon that contains those changes regardless

Avnsx commented 1 year ago

Should be fixed with commit https://github.com/Avnsx/Fansly-Downloader-App/commit/2736a5417d0a6db75f56064371b305fdaafcd52b

Avnsx commented 1 year ago

Closing, as the 0.4 version is finally released and does target & solve the topics mentioned within this issue.

If you're on the previous 0.3.5 version you can comfortably update using the updater.exe supplied in the version, or just manually download the 0.4 version from the repositories Releases.