datawhores / OF-Scraper

A completely revamped and redesigned fork, reimagined from scratch based on the original onlyfans-scraper
MIT License
559 stars 50 forks source link

Traces on 3.10 with no downloads #399

Closed PsychoSid closed 3 weeks ago

PsychoSid commented 4 weeks ago

Getting this with a new 3.10 update

[main_download.send_req_inner:202]  Media:3347036519 Post:1102265503 data from request {'content-total': 7282617, 'content-type': 'video/mp4'}                                                                                                                                                                            [main_download.py](file:///home/seedit4me/.local/pipx/venvs/ofscraper/lib/python3.11/site-packages/ofscraper/download/main_download.py):202
 [main_download.send_req_inner:203]  Media:3347036519 Post:1102265503 total from request 7.28 MB                                                                                                                                                                                                                           [main_download.py](file:///home/seedit4me/.local/pipx/venvs/ofscraper/lib/python3.11/site-packages/ofscraper/download/main_download.py):203
 [placeholder.createfilename:338]  final filename path None                                                                                                                                                                                                                                                                  [placeholder.py](file:///home/seedit4me/.local/pipx/venvs/ofscraper/lib/python3.11/site-packages/ofscraper/classes/placeholder.py):338
TRACEBACK_  [helpers.inner:11]  Media:3347036519 Post:1102265503  Traceback (most recent call last):                                                                                                                                                                                                                              [helpers.py](file:///home/seedit4me/.local/pipx/venvs/ofscraper/lib/python3.11/site-packages/ofscraper/utils/logs/helpers.py):11
             File "/home/your_username/.local/pipx/venvs/ofscraper/lib/python3.11/site-packages/ofscraper/download/main_download.py", line 97, in main_download_downloader                                                                                                                                                                     
               return await fresh_data_handler(c, tempholderObj, ele)                                                                                                                                                                                                                                                                          
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                                                                          
             File "/home/your_username/.local/pipx/venvs/ofscraper/lib/python3.11/site-packages/ofscraper/download/main_download.py", line 126, in fresh_data_handler                                                                                                                                                                          
               raise E                                                                                                                                                                                                                                                                                                                         
             File "/home/your_username/.local/pipx/venvs/ofscraper/lib/python3.11/site-packages/ofscraper/download/main_download.py", line 122, in fresh_data_handler                                                                                                                                                                          
               result = await main_download_sendreq(                                                                                                                                                                                                                                                                                           
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                                                                                           
             File "/home/your_username/.local/pipx/venvs/ofscraper/lib/python3.11/site-packages/ofscraper/download/main_download.py", line 183, in main_download_sendreq                                                                                                                                                                       
               raise E                                                                                                                                                                                                                                                                                                                         
             File "/home/your_username/.local/pipx/venvs/ofscraper/lib/python3.11/site-packages/ofscraper/download/main_download.py", line 174, in main_download_sendreq                                                                                                                                                                       
               return await send_req_inner(                                                                                                                                                                                                                                                                                                    
                      ^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                                                                                                    
             File "/home/your_username/.local/pipx/venvs/ofscraper/lib/python3.11/site-packages/ofscraper/download/main_download.py", line 238, in send_req_inner                                                                                                                                                                              
               raise E                                                                                                                                                                                                                                                                                                                         
             File "/home/your_username/.local/pipx/venvs/ofscraper/lib/python3.11/site-packages/ofscraper/download/main_download.py", line 215, in send_req_inner                                                                                                                                                                              
               placeholderObj = await placeholder.Placeholders(                                                                                                                                                                                                                                                                                
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                                                                                
             File "/home/your_username/.local/pipx/venvs/ofscraper/lib/python3.11/site-packages/ofscraper/classes/placeholder.py", line 191, in init                                                                                                                                                                                           
               self._filepath = paths.truncate(pathlib.Path(dir, file))                                                                                                                                                                                                                                                                        
                                               ^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                                                                         
             File "/usr/lib/python3.11/pathlib.py", line 871, in __new__                                                                                                                                                                                                                                                                       
               self = cls._from_parts(args)                                                                                                                                                                                                                                                                                                    
                      ^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                                                                                                    
             File "/usr/lib/python3.11/pathlib.py", line 509, in _from_parts                                                                                                                                                                                                                                                                   
               drv, root, parts = self._parse_args(args)                                                                                                                                                                                                                                                                                       
                                  ^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                                                                                       
             File "/usr/lib/python3.11/pathlib.py", line 493, in _parse_args                                                                                                                                                                                                                                                                   
               a = os.fspath(a)                                                                                                                                                                                                                                                                                                                
                   ^^^^^^^^^^^^                                                                                                                                                                                                                                                                                                                
           TypeError: expected str, bytes or os.PathLike object, not NoneType

System Info

PsychoSid commented 4 weeks ago

This is my config


{
    "main_profile": "main_profile",
    "metadata": "{configpath}/{profile}/.data/{model_username}_{model_id}",
    "discord": "https://discord.com/api/webhooks/<url>",
    "file_options": {
        "save_location": "/home/seedit4me/ofs",
        "dir_format": "{model_username}/",
        "file_format": "{model_username}.{date}-{filename}-{text}.OnlyFans.{ext}",
        "textlength": 0,
        "space_replacer": " ",
        "date": "YYYYMMDD",
        "text_type_default": "letter",
        "truncation_default": true
    },
    "download_options": {
        "file_size_max": 0,
        "file_size_min": 0,
        "filter": [
            "Images",
            "Audios",
            "Videos"
        ],
        "auto_resume": false,
        "system_free_min": 0,
        "max_post_count": 0
    },
    "binary_options": {
        "mp4decrypt": "/usr/local/bin/mp4decrypt",
        "ffmpeg": "/usr/bin/ffmpeg"
    },
    "cdm_options": {
        "private-key": null,
        "client-id": null,
        "key-mode-default": "keydb",
        "keydb_api": "<hash>"
    },
    "performance_options": {
        "download-sem": 6,
        "threads": 8
    },
    "advanced_options": {
        "code-execution": false,
        "dynamic-mode-default": "deviint",
        "backend": "aio",
        "downloadbars": false,
        "cache-mode": "sqlite",
        "appendlog": true,
        "custom_values": {
            "FILE_COUNT_PLACEHOLDER": false
        },
        "sanitize_text": false,
        "temp_dir": null,
        "remove_hash_match": false,
        "infinite_loop_action_mode": false,
        "post_download_script": null,
        "disable_auto_after": false,
        "default_user_list": "main",
        "default_black_list": ""
    },
    "responsetype": {
        "timeline": "posts",
        "message": "messages",
        "archived": "archived",
        "paid": "paid",
        "stories": "stories",
        "highlights": "highlights",
        "profile": "profile",
        "pinned": "archived"
    },
    "overwrites": {
        "audios": {},
        "videos": {},
        "images": {},
        "text": {}
    }
}
PsychoSid commented 4 weeks ago

The command I execute is

ofscraper -u <comma_list> --posts all --action download,like --discord LOW --output DEBUG --log DEBUG --original --downloadbars
PsychoSid commented 3 weeks ago

This is still happening with 3.10.4 btw.

datawhores commented 3 weeks ago

Okay I know what is wrong now

FILE_COUNT_PLACEHOLDER is not return a valid output when false but I don't think this option will be required any more in your case

I made some changes to the code, so that count only displays if "text", "postid", "post_id","ext" are the 'only' options used. As soon as another placeholder is used, it should remove the need for a count

Which is true for your config

PsychoSid commented 3 weeks ago

Thank did it. Many thanks again.

PsychoSid commented 3 weeks ago

Thank did it. Many thanks again.