k0rnh0li0 / onlyfans-dl

OnlyFans content downloader
GNU General Public License v3.0
772 stars 221 forks source link

TypeError: expected string or bytes-like object #241

Closed Arboff closed 8 months ago

Arboff commented 1 year ago

Greetings, on some accounts I get presented with the following:

Saving profile info... Downloading avatar... Downloading header... Finding photos... Found 240 photos. Finding videos... Found 415 videos. Finding archived content... Found 0 archived posts. Found 655 posts. Downloading media... Traceback (most recent call last): File "C:\Users\OneDrive\Работен плот\onlyfans-dl-master\onlyfans-dl-master\onlyfans-dl.py", line 428, in cur_count = download_posts(cur_count, video_posts, False) File "C:\Users\OneDrive\Работен плот\onlyfans-dl-master\onlyfans-dl-master\onlyfans-dl.py", line 281, in download_posts download_media(media, is_archived) File "C:\Users\OneDrive\Работен плот\onlyfans-dl-master\onlyfans-dl-master\onlyfans-dl.py", line 222, in download_media ext = re.findall('.\w+\?', source) File "C:\Users\AppData\Local\Programs\Python\Python39\lib\re.py", line 241, in findall return _compile(pattern, flags).findall(string) TypeError: expected string or bytes-like object

xiushan97 commented 1 year ago

Onlyfans has changed their api media["source"]["source"] won't be the video‘s full url

{
  "source": {
    "source": "None",
    "width": 1920,
    "height": 1080,
    "size": 0,
    "duration": 1
  }
}
Skordean commented 1 year ago

Onlyfans has changed their api media["source"]["source"] won't be the video‘s full url

{
  "source": {
    "source": "None",
    "width": 1920,
    "height": 1080,
    "size": 0,
    "duration": 1
  }
}

Do I need to put this where media["source"]["source"] is? without the { at the beginning?

KharonStyx commented 1 year ago

Looks like someone applied a patch. It does work but not in the intended way.

235 they replaced line 218 but now puts everything in Archive.