Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

auth fix #402

Closed
datawhores opened this issue Jun 5, 2024 · 76 comments
Closed

auth fix #402

datawhores opened this issue Jun 5, 2024 · 76 comments

Comments

@datawhores
Copy link
Owner

datawhores commented Jun 5, 2024

The recommended method to ensure proper auth is to just upgrade to the latest version
If your using a very old version of the script then the amount of support will be limited

Generic Instructions

https://gist.github.com/datawhores/8e8be131fb1b190b50c5324ab2ca5f89

Instead of using 'growik' use one of the valid urls listed below

If your on 3.10.7 or using the latest commits use this pattern instead of option 1

https://gist.github.com/datawhores/82b51e1463c2fea8286e0d41cdc35d5c

List of valid urls
https://gist.github.com/datawhores/76914ae80944fe1913789e232a9b52f0

@datawhores datawhores pinned this issue Jun 5, 2024
@datawhores datawhores reopened this Jun 6, 2024
@666diabolus
Copy link

after change it into growik, the script pass the low scan, let me choose the option, scraping the database (very slow) and then stop, nothing downloaded.

@datawhores
Copy link
Owner Author

after change it into growik, the script pass the low scan, let me choose the option, scraping the database (very slow) and then stop, nothing downloaded.

You should provide logs and config file

@r32bum
Copy link

r32bum commented Jun 6, 2024

Same issue as user above, log and config below
ofscraper_main_profile_2024-06-06.log
config.json

issue may stem from

`" 2024-06-06 13:37:11:[helpers.inner:11] Traceback (most recent call last):
File "C:\Users\USER\AppData\Local\Programs\Python\Python312\Lib\site-packages\ofscraper\commands\helpers\normal.py", line 30, in wrapper
all_media=filters.filtermediaFinal(all_media, model_id, username)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\USER\AppData\Local\Programs\Python\Python312\Lib\site-packages\ofscraper\filters\media\main.py", line 42, in filtermediaFinal
return helpers.previous_download_filter(media, username=username, model_id=model_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\USER\AppData\Local\Programs\Python\Python312\Lib\site-packages\ofscraper\filters\media\helpers\helpers.py", line 172, in previous_download_filter
media_ids = set(get_media_ids_downloaded(model_id=model_id, username=username))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\USER\AppData\Local\Programs\Python\Python312\Lib\site-packages\ofscraper\db\operations_\wrapper.py", line 122, in inner
raise E
File "C:\Users\USER\AppData\Local\Programs\Python\Python312\Lib\site-packages\ofscraper\db\operations_\wrapper.py", line 98, in inner
or placeholder.databasePlaceholder().databasePathHelper(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\USER\AppData\Local\Programs\Python\Python312\Lib\site-packages\ofscraper\classes\placeholder.py", line 73, in inner
return f(args[0], *args[1:], **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\USER\AppData\Local\Programs\Python\Python312\Lib\site-packages\ofscraper\classes\placeholder.py", line 124, in databasePathHelper
self._variables.update({"first_letter": model_username[0].capitalize()})
~~~~~~~~~~~~~~^^^
TypeError: 'int' object is not subscriptable

2024-06-06 13:37:11:[scrape_context.scrape_context_manager:37] `

@666diabolus
Copy link

666diabolus commented Jun 6, 2024

after change it into growik, the script pass the low scan, let me choose the option, scraping the database (very slow) and then stop, nothing downloaded.

You should provide logs and config file

I was about to record another fresh log for you but now it's starting to scrap (weird), using growik, same config, latest commit 3.10.2, exactly 24 hour after it crash the first time.

@WyohKnott
Copy link
Contributor

WyohKnott commented Jun 6, 2024

Yes I tried the new stuff.

python3 -m pip install git+https://github.com/datawhores/OF-Scraper.git@3.10b

or

python3 -m pip install git+https://github.com/datawhores/OF-Scraper.git

 [sessionmanager.<lambda>:320]  attempt: 2 for https://onlyfans.com/api2/v2/users/me                                                               sessionmanager.py:320
 [sessionmanager.requests:356]  failed:  https://onlyfans.com/api2/v2/users/me                                                                     sessionmanager.py:356
 [sessionmanager.requests:357]  status:  400                                                                                                       sessionmanager.py:357
 [sessionmanager.requests:358]  response text : {"error":{"code":0,"message":"Something went wrong. [29141B1D]"}}                                  sessionmanager.py:358
 [sessionmanager.requests:359]  headers: Headers([('date', 'Thu, 06 Jun 2024 18:40:56 GMT'), ('content-type', 'application/json; charset=utf-8'),  sessionmanager.py:359
('content-length', '65'), ('set-cookie', 'sess=validnewsess; expires=Sun, 16-Jun-2024 18:40:56 GMT; Max-Age=864000; path=/;                               
domain=.onlyfans.com; secure; HttpOnly'), ('expires', 'Thu, 19 Nov 1981 08:52:00 GMT'), ('cache-control', 'no-store, no-cache, must-revalidate'),                       
('pragma', 'no-cache'), ('x-of-rev', 'stuff-stuff'), ('strict-transport-security', 'max-age=31536000; includeSubdomains; preload'),                         
('x-frame-options', 'DENY'), ('cf-cache-status', 'DYNAMIC'), ('set-cookie', 'sess=validnewsess; expires=Sun, 16-Jun-2024 18:40:56                         
GMT; Max-Age=864000; path=/; domain=.onlyfans.com; secure; HttpOnly'), ('set-cookie',                                                                                   
'__cf_bm=DDFBE.JjdoE2Yb1vstuffWWn_HbjoHN16r0-1717699256-1.0.1.1-2s7u6D6aDuqw6kph5mQGVUGU9jEQlN9u7irRqhfKO8tXEy2NhxADstuffJNnl2.Xt5PixW                      
uSiN2LAKrg1A; path=/; expires=Thu, 06-Jun-24 19:10:56 GMT; domain=.onlyfans.com; HttpOnly; Secure; SameSite=None'), ('set-cookie',                                      
'_cfuvid=vWd25q1w9BlC9tstuffIaXFfaDf9L_OJxtbI2ROo-1717stuff449-0.0.1.1-604800000; path=/; domain=.onlyfans.com; HttpOnly; Secure;                                   
SameSite=None'), ('server', 'cloudflare'), ('cf-ray', '88fa889ffaa1366e-FRA'), ('alt-svc', 'h3=":443"; ma=86400')])                                                     
TRACEBACK_  [helpers.inner:11]  Client error '400 Bad Request' for url 'https://onlyfans.com/api2/v2/users/me'                                             helpers.py:11
           For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/400                                                                     
TRACEBACK_  [helpers.inner:11]  Traceback (most recent call last):                                                                                         helpers.py:11
             File "/home/your_username/.local/lib/python3.12/site-packages/ofscraper/classes/sessionmanager.py", line 360, in requests                                  
               r.raise_for_status()                                                                                                                                     
             File "/home/your_username/.local/lib/python3.12/site-packages/httpx/_models.py", line 761, in raise_for_status                                             
               raise HTTPStatusError(message, request=request, response=self)                                                                                           
           httpx.HTTPStatusError: Client error '400 Bad Request' for url 'https://onlyfans.com/api2/v2/users/me'                                                        
           For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/400      

conf:

{
    "main_profile": "main_profile",
    "metadata": "/run/media/stuff/29e35030-fa36-49bd-a525-d85fa7a0498d/Vaults/backup/ofscraper2/meta/{model_username}_{model_id}/",
    "discord": "",
    "file_options": {
        "save_location": "/run/media/stuff/29e35030-fa36-49bd-a525-d85fa7a0498d/Vaults/backup/ofscraper2/",
        "dir_format": "{model_username}/{responsetype}/{value}/{mediatype}/",
        "file_format": "{date}_{filename}.{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": true,
        "system_free_min": 0,
        "max_post_count": 0
    },
    "binary_options": {
        "mp4decrypt": "/home/stuff/.config/ofscraper/bin/mp4decrypt",
        "ffmpeg": "/usr/bin/ffmpeg"
    },
    "cdm_options": {
        "private-key": null,
        "client-id": null,
        "key-mode-default": "keydb",
        "keydb_api": "apikey"
    },
    "performance_options": {
        "download-sem": 6,
        "threads": 10
    },
    "advanced_options": {
        "code-execution": false,
        "dynamic-mode-default": "growik",
        "backend": "aio",
        "downloadbars": false,
        "cache-mode": "sqlite",
        "appendlog": true,
        "custom_values": null,
        "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": "somebuggymodel"
    },
    "responsetype": {
        "timeline": "Posts",
        "message": "Messages",
        "archived": "Archived",
        "paid": "Messages",
        "stories": "Stories",
        "highlights": "Stories",
        "profile": "Profile",
        "pinned": "Posts"
    },
    "overwrites": {
        "audios": {},
        "videos": {},
        "images": {},
        "text": {}
    }
}

@datawhores
Copy link
Owner Author

Same issue as user above, log and config below ofscraper_main_profile_2024-06-06.log config.json

issue may stem from

`" 2024-06-06 13:37:11:[helpers.inner:11] Traceback (most recent call last): File "C:\Users\USER\AppData\Local\Programs\Python\Python312\Lib\site-packages\ofscraper\commands\helpers\normal.py", line 30, in wrapper all_media=filters.filtermediaFinal(all_media, model_id, username) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\USER\AppData\Local\Programs\Python\Python312\Lib\site-packages\ofscraper\filters\media\main.py", line 42, in filtermediaFinal return helpers.previous_download_filter(media, username=username, model_id=model_id) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\USER\AppData\Local\Programs\Python\Python312\Lib\site-packages\ofscraper\filters\media\helpers\helpers.py", line 172, in previous_download_filter media_ids = set(get_media_ids_downloaded(model_id=model_id, username=username)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\USER\AppData\Local\Programs\Python\Python312\Lib\site-packages\ofscraper\db\operations_\wrapper.py", line 122, in inner raise E File "C:\Users\USER\AppData\Local\Programs\Python\Python312\Lib\site-packages\ofscraper\db\operations_\wrapper.py", line 98, in inner or placeholder.databasePlaceholder().databasePathHelper( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\USER\AppData\Local\Programs\Python\Python312\Lib\site-packages\ofscraper\classes\placeholder.py", line 73, in inner return f(args[0], *args[1:], **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\USER\AppData\Local\Programs\Python\Python312\Lib\site-packages\ofscraper\classes\placeholder.py", line 124, in databasePathHelper self._variables.update({"first_letter": model_username[0].capitalize()}) ~~~~~~~~~~~~~~^^^ TypeError: 'int' object is not subscriptable

2024-06-06 13:37:11:[scrape_context.scrape_context_manager:37] `

This is a different issue and should be fixed in 3.10.2

@datawhores
Copy link
Owner Author

This is the only one that would work
python3 -m pip install git+https://github.com/datawhores/OF-Scraper.git@3.10b

and did you update the auth file

@WyohKnott
Copy link
Contributor

WyohKnott commented Jun 6, 2024

This is the only one that would work python3 -m pip install git+https://github.com/datawhores/OF-Scraper.git@3.10b

and did you update the auth file

yes, i'll try again

Edit: Works with auth from Brave, didn't work with from Edge or Firefox.

@avekifes
Copy link

avekifes commented Jun 7, 2024

I still cannot figure this out.

Script version is 3.10.2, confirmed with ofscraper --version command.

Config is as follows:

},
"advanced_options": {
"code-execution": false,
"dynamic-mode-default": "growik",
"backend": "aio",
"downloadbars": false,
"cache-mode": "sqlite",
"appendlog": true,
"custom_values": null,
"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": "active",
"default_black_list": ""
},

Yet it keeps asking me to fill out my auth info every time.

@datawhores
Copy link
Owner Author

Are you getting logged out when you try

@avekifes
Copy link

avekifes commented Jun 7, 2024

Are you getting logged out when you try

Nope. I've double checked that the auth is filled out correctly, too.

@dunngitter
Copy link
Contributor

I'm getting what looks like (to me) the same error:

Log
ofscraper  | TRACEBACK_  [helpers.inner:11]  Client error '400 Bad Request' for helpers.py:11
ofscraper  |            url 'https://onlyfans.com/api2/v2/users/me'
ofscraper  |            For more information check:
ofscraper  |            https://developer.mozilla.org/en-US/docs/Web/HTTP/Statu
ofscraper  |            s/400
ofscraper  | TRACEBACK_  [helpers.inner:11]  Traceback (most recent call last): helpers.py:11
ofscraper  |              File
ofscraper  |            "/venv/lib/python3.11/site-packages/your_username/class
ofscraper  |            es/sessionmanager.py", line 360, in requests
ofscraper  |                r.raise_for_status()
ofscraper  |              File
ofscraper  |            "/venv/lib/python3.11/site-packages/httpx/_models.py",
ofscraper  |            line 761, in raise_for_status
ofscraper  |                raise HTTPStatusError(message, request=request,
ofscraper  |            response=self)
ofscraper  |            httpx.HTTPStatusError: Client error '400 Bad Request'
ofscraper  |            for url 'https://onlyfans.com/api2/v2/users/me'
ofscraper  |            For more information check:
ofscraper  |            https://developer.mozilla.org/en-US/docs/Web/HTTP/Statu
ofscraper  |            s/400
ofscraper  |
ofscraper  | TRACEBACK_  [helpers.inner:11]  Client error '400 Bad Request' for helpers.py:11
ofscraper  |            url 'https://onlyfans.com/api2/v2/users/me'
ofscraper  |            For more information check:
ofscraper  |            https://developer.mozilla.org/en-US/docs/Web/HTTP/Statu
ofscraper  |            s/400
ofscraper  | TRACEBACK_  [helpers.inner:11]  Traceback (most recent call last): helpers.py:11
ofscraper  |              File
ofscraper  |            "/venv/lib/python3.11/site-packages/your_username/api/m
ofscraper  |            e.py", line 38, in _scraper_user_helper
ofscraper  |                with c.requests(constants.getattr("meEP")) as r:
ofscraper  |              File "/usr/local/lib/python3.11/contextlib.py", line
ofscraper  |            137, in __enter__
ofscraper  |                return next(self.gen)
ofscraper  |                       ^^^^^^^^^^^^^^
ofscraper  |              File
ofscraper  |            "/venv/lib/python3.11/site-packages/your_username/class
ofscraper  |            es/sessionmanager.py", line 313, in requests
ofscraper  |                for _ in Retrying(
ofscraper  |              File
ofscraper  |            "/venv/lib/python3.11/site-packages/tenacity/__init__.p
ofscraper  |            y", line 347, in __iter__
ofscraper  |                do = self.iter(retry_state=retry_state)
ofscraper  |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ofscraper  |              File
ofscraper  |            "/venv/lib/python3.11/site-packages/tenacity/__init__.p
ofscraper  |            y", line 325, in iter
ofscraper  |                raise retry_exc.reraise()
ofscraper  |                      ^^^^^^^^^^^^^^^^^^^
ofscraper  |              File
ofscraper  |            "/venv/lib/python3.11/site-packages/tenacity/__init__.p
ofscraper  |            y", line 158, in reraise
ofscraper  |                raise self.last_attempt.result()
ofscraper  |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
ofscraper  |              File
ofscraper  |            "/usr/local/lib/python3.11/concurrent/futures/_base.py"
ofscraper  |            , line 449, in result
ofscraper  |                return self.__get_result()
ofscraper  |                       ^^^^^^^^^^^^^^^^^^^
ofscraper  |              File
ofscraper  |            "/usr/local/lib/python3.11/concurrent/futures/_base.py"
ofscraper  |            , line 401, in __get_result
ofscraper  |                raise self._exception
ofscraper  |              File
ofscraper  |            "/venv/lib/python3.11/site-packages/your_username/class
ofscraper  |            es/sessionmanager.py", line 367, in requests
ofscraper  |                raise E
ofscraper  |              File
ofscraper  |            "/venv/lib/python3.11/site-packages/your_username/class
ofscraper  |            es/sessionmanager.py", line 360, in requests
ofscraper  |                r.raise_for_status()
ofscraper  |              File
ofscraper  |            "/venv/lib/python3.11/site-packages/httpx/_models.py",
ofscraper  |            line 761, in raise_for_status
ofscraper  |                raise HTTPStatusError(message, request=request,
ofscraper  |            response=self)
ofscraper  |            httpx.HTTPStatusError: Client error '400 Bad Request'
ofscraper  |            for url 'https://onlyfans.com/api2/v2/users/me'
ofscraper  |            For more information check:
ofscraper  |            https://developer.mozilla.org/en-US/docs/Web/HTTP/Statu
ofscraper  |            s/400
ofscraper  |
ofscraper  | TRACEBACK_  [helpers.inner:11]  Client error '400 Bad Request' for helpers.py:11
ofscraper  |            url 'https://onlyfans.com/api2/v2/users/me'
ofscraper  |            For more information check:
ofscraper  |            https://developer.mozilla.org/en-US/docs/Web/HTTP/Statu
ofscraper  |            s/400
ofscraper  | TRACEBACK_  [helpers.inner:11]  Traceback (most recent call last): helpers.py:11
ofscraper  |              File
ofscraper  |            "/venv/lib/python3.11/site-packages/your_username/api/i
ofscraper  |            nit.py", line 34, in getstatus
ofscraper  |                me.scrape_user()
ofscraper  |              File
ofscraper  |            "/venv/lib/python3.11/site-packages/your_username/api/m
ofscraper  |            e.py", line 33, in scrape_user
ofscraper  |                return _scraper_user_helper(c)
ofscraper  |                       ^^^^^^^^^^^^^^^^^^^^^^^
ofscraper  |              File
ofscraper  |            "/venv/lib/python3.11/site-packages/your_username/api/m
ofscraper  |            e.py", line 53, in _scraper_user_helper
ofscraper  |                raise E
ofscraper  |              File
ofscraper  |            "/venv/lib/python3.11/site-packages/your_username/api/m
ofscraper  |            e.py", line 38, in _scraper_user_helper
ofscraper  |                with c.requests(constants.getattr("meEP")) as r:
ofscraper  |              File "/usr/local/lib/python3.11/contextlib.py", line
ofscraper  |            137, in __enter__
ofscraper  |                return next(self.gen)
ofscraper  |                       ^^^^^^^^^^^^^^
ofscraper  |              File
ofscraper  |            "/venv/lib/python3.11/site-packages/your_username/class
ofscraper  |            es/sessionmanager.py", line 313, in requests
ofscraper  |                for _ in Retrying(
ofscraper  |              File
ofscraper  |            "/venv/lib/python3.11/site-packages/tenacity/__init__.p
ofscraper  |            y", line 347, in __iter__
ofscraper  |                do = self.iter(retry_state=retry_state)
ofscraper  |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ofscraper  |              File
ofscraper  |            "/venv/lib/python3.11/site-packages/tenacity/__init__.p
ofscraper  |            y", line 325, in iter
ofscraper  |                raise retry_exc.reraise()
ofscraper  |                      ^^^^^^^^^^^^^^^^^^^
ofscraper  |              File
ofscraper  |            "/venv/lib/python3.11/site-packages/tenacity/__init__.p
ofscraper  |            y", line 158, in reraise
ofscraper  |                raise self.last_attempt.result()
ofscraper  |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
ofscraper  |              File
ofscraper  |            "/usr/local/lib/python3.11/concurrent/futures/_base.py"
ofscraper  |            , line 449, in result
ofscraper  |                return self.__get_result()
ofscraper  |                       ^^^^^^^^^^^^^^^^^^^
ofscraper  |              File
ofscraper  |            "/usr/local/lib/python3.11/concurrent/futures/_base.py"
ofscraper  |            , line 401, in __get_result
ofscraper  |                raise self._exception
ofscraper  |              File
ofscraper  |            "/venv/lib/python3.11/site-packages/your_username/class
ofscraper  |            es/sessionmanager.py", line 367, in requests
ofscraper  |                raise E
ofscraper  |              File
ofscraper  |            "/venv/lib/python3.11/site-packages/your_username/class
ofscraper  |            es/sessionmanager.py", line 360, in requests
ofscraper  |                r.raise_for_status()
ofscraper  |              File
ofscraper  |            "/venv/lib/python3.11/site-packages/httpx/_models.py",
ofscraper  |            line 761, in raise_for_status
ofscraper  |                raise HTTPStatusError(message, request=request,
ofscraper  |            response=self)
ofscraper  |            httpx.HTTPStatusError: Client error '400 Bad Request'
ofscraper  |            for url 'https://onlyfans.com/api2/v2/users/me'
ofscraper  |            For more information check:
ofscraper  |            https://developer.mozilla.org/en-US/docs/Web/HTTP/Statu
ofscraper  |            s/400
ofscraper  |
ofscraper  |  [checkers.check_auth:20]  Auth Failed                            checkers.py:20
ofscraper  | For an example of how your auth file should look see
ofscraper  |  https://of-scraper.gitbook.io/of-scraper/auth#example
ofscraper  | If you still can't authenticate after editing from script consider manually edit
ofscraper  | the file at
ofscraper  | /home/ofscraper/config/main_profile/auth.json

This log file is from checking out the 3.10b branch locally and building the docker container, but I've also tried with the 3.10.2 docker image, with the same results (at least as far as I could see).

Every time I try running it, I get logged out of OF.

Config

Spoiler text. Note that it's important to have a space after the summary tag. You should be able to write any markdown you want inside the <details> tag... just make sure you close <details> afterward.

{
  "main_profile": "main_profile",
  "metadata": "{save_location}/{model_username}/Metadata",
  "discord": "",
  "file_options": {
      "save_location": "/data",
      "dir_format": "{model_username}/{responsetype}/{value}/{mediatype}/",
      "file_format": "{filename}.{ext}",
      "textlength": 0,
      "space_replacer": " ",
      "date": "MM-DD-YYYY",
      "text_type_default": "letter",
      "truncation_default": true
  },
  "download_options": {
      "file_size_max": 0,
      "file_size_min": 0,
      "filter": [
          "Images",
          "Audios",
          "Videos"
      ],
      "auto_resume": true,
      "system_free_min": 0,
      "max_post_count": 0
  },
  "binary_options": {
      "mp4decrypt": "/home/ofscraper/bin/mp4decrypt",
      "ffmpeg": "/home/ofscraper/bin/ffmpeg"
  },
  "cdm_options": {
      "private-key": null,
      "client-id": null,
      "key-mode-default": "cdrm",
      "keydb_api": ""
  },
  "performance_options": {
      "download-sem": 6,
      "threads": 2
  },
  "advanced_options": {
      "code-execution": false,
      "dynamic-mode-default": "deviint",
      "backend": "aio",
      "downloadbars": false,
      "cache-mode": "sqlite",
      "appendlog": true,
      "custom_values": null,
      "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": "Posts"
  },
  "overwrites": {
      "audios": {},
      "videos": {},
      "images": {},
      "text": {}
  }
}

This is running with docker-compose, using command:

command: ["ofscraper", "--config", "/home/ofscraper/config/config.json", "--daemon", "5400", "--black-list", "blacklisted", "--username", "ALL", "--posts", "all", "--action", "download", "--output", "debug", "--log", "debug"]

@bogdanbdg
Copy link

bogdanbdg commented Jun 7, 2024

Are you getting logged out when you try

Yes. Apparently after three attempts, which look like:

2024-06-07 12:02:33:[checkers.check_auth:20]  Auth Failed
 2024-06-07 12:03:56:[request.get_request_auth:48]  getting new signature
 2024-06-07 12:03:57:[request.get_request_auth:48]  getting new signature
 2024-06-07 12:03:58:[sessionmanager.requests:356]  failed:  https://onlyfans.com/api2/v2/users/me
 2024-06-07 12:03:58:[sessionmanager.requests:357]  status:  400
 2024-06-07 12:03:58:[sessionmanager.requests:358]  response text : {"error":{"code":301,"message":"Wrong user."}}
 2024-06-07 12:03:58:[sessionmanager.requests:359]  headers: Headers([('date', 'Fri, 07 Jun 2024 12:03:58 GMT'), ('content-type', 'application/json; charset=utf-8'), ('content-length', '46'), ('expires', 'Thu, 19 Nov 1981 08:52:00 GMT'), ('cache-control', 'no-store, no-cache, must-revalidate'), ('pragma', 'no-cache'), ('set-cookie', 'sess=qq0hasioj8l48481dgvgn7gj6d; expires=Mon, 17-Jun-2024 12:03:58 GMT; Max-Age=864000; path=/; domain=.onlyfans.com; secure; HttpOnly'), ('access-control-allow-credentials', 'true'), ('access-control-allow-methods', 'GET, PUT, POST, DELETE, OPTIONS, PATCH'), ('access-control-allow-headers', 'Origin, Content-Type, Authorization, X-Requested-With, User-Agent, Access-Token, User-Id, Time, Sign, X-BC, App-Token, X-Of-Rev, X-Hash, Csrf'), ('access-control-expose-headers', 'Content-Length, Content-Range, Date, Access-Token, User-Id, X-OF-REV'), ('allow', 'PUT, GET, DELETE, POST'), ('x-of-rev', '202406061350-b0621cb88f'), ('strict-transport-security', 'max-age=31536000; includeSubdomains; preload'), ('x-frame-options', 'DENY'), ('cf-cache-status', 'DYNAMIC'), ('set-cookie', '__cf_bm=VDf5Lvhicaq9mipBJvsxxERnCoW5rKZex4IwGP6CQLs-1717761838-1.0.1.1-0XyeO10IF6QRKjzPVDsr2FoJXVVwnTONIVgnmybLfq8N.2JNslmkvj_ARQNEVkyQus8AteUv1N5J4nt2vc2R1g; path=/; expires=Fri, 07-Jun-24 12:33:58 GMT; domain=.onlyfans.com; HttpOnly; Secure; SameSite=None'), ('set-cookie', '_cfuvid=UqpVgu7jPncYtCMo5IWctH75NyDIIUnScpPpZIpPsoA-1717761838884-0.0.1.1-604800000; path=/; domain=.onlyfans.com; HttpOnly; Secure; SameSite=None'), ('server', 'cloudflare'), ('cf-ray', '89008084292eb1fd-WAW'), ('alt-svc', 'h3=":443"; ma=86400')])
 2024-06-07 12:03:58:[helpers.inner:11]  Client error '400 Bad Request' for url 'https://onlyfans.com/api2/v2/users/me'

@see-spot-run
Copy link

Similar issues here! Have 10.0.2 installed, config updated to growik, using Firefox and the OF Cookie Helper to grab auth info, added it to the Auth file, can't get past the auth screen in ofscraper. I also get logged out of the OF website sometimes after running ofscraper.

Log here:
ofscraper_main_profile_2024-06-07_public.txt

@Sicofra
Copy link

Sicofra commented Jun 7, 2024

ofscraper_main_profile_2024-06-07.txt
config.json

Also cannot get past the Authentication. I started today with 3.9.x2ish? and ended up with authentication error. Tried paste cookie details again, still auth error.
I have done
py -3 -m pip uninstall ofscraper
followed by
py -3 -m pip install ofscraper --upgrade

so now on 3.10.2
Also tried pasting cookie details from the Cookie helper and also manually but It ends in the same error. Since I have tried that about 20 times or so, each time now I tried ofscraper Onlyfans page will log me out.

@datawhores
Copy link
Owner Author

Please update to
3.10.3 when it releases a few minutes after this post

and when the 400 error happens make sure to double check the information printed to console to make sure that it matches with what your browser says

Make sure that you check to make sure that the user_agent is correct, and that there are not any additional spaces
Also make sure that the right dynamic rule is being used

@Sicofra
Copy link

Sicofra commented Jun 7, 2024

Please update to 3.10.3 when it releases a few minutes after this post

and when the 400 error happens make sure to double check the information printed to console to make sure that it matches with what your browser says

Make sure that you check to make sure that the user_agent is correct, and that there are not any additional spaces Also make sure that the right dynamic rule is being used

Thanks, updating to 3.10.3 AND changing dynamic rule default to : growik made the trick...
(Tho https://of-scraper.gitbook.io/of-scraper/getting-started/config-options/advanced-config-options#dynamic-mode-default does not mention other modes so no clue what it does against the default deviint but it works :) )

@datawhores
Copy link
Owner Author

datawhores commented Jun 7, 2024

It just some data that is added to identifiy a requests as valid

They all do the same thing, the only

difference is that the other options are not up to date with changes on the site

@bogdanbdg
Copy link

Please update to
3.10.3 when it releases

It said 3.10.4 when I upgraded just now

Also make sure that the right dynamic rule is being used

Which one is "the right" one? I read above that another user changed the default to "growik" so I did the same and it seems to work now.

@datawhores
Copy link
Owner Author

datawhores commented Jun 7, 2024

growik is the only option that works at the moment

  • I've removed sneaky since that repo is deleted

  • I'm keeping digital and deviint as they might start working again, and if they do may be used as alternative

@666diabolus
Copy link

666diabolus commented Jun 7, 2024

growik is the only option that works at the moment

  • I've removed sneaky since that repo is deleted

  • I'm keeping digital and deviint as they might start working again, and if they do may be used as alternative

I've noticed that growik working speed is pretty much slow compare to deviint, is that the nature of it or it just myself?

@datawhores
Copy link
Owner Author

datawhores commented Jun 7, 2024

growik is the only option that works at the moment

  • I've removed sneaky since that repo is deleted
  • I'm keeping digital and deviint as they might start working again, and if they do may be used as alternative

I've noticed that growik working speed is pretty much slow compare to deviint, is that the nature of it or it just myself?

I mean they all are being served via github so they should all be quick
maybe It's related to growik being updated more frequently, but I am not sure

@jp1151419
Copy link

I can confirm I just did a fresh install and I got v3.10.4 which is correctly downloading content again, using "growik".

Many thanks @datawhores

@BragnarXIX
Copy link

Puedo confirmar que acabo de realizar una instalación nueva y obtuve la versión 3.10.4 que descarga contenido correctamente nuevamente, usando "growik".

Muchas gracias@datawhores

Did you just change the word to growik in the configuration or do you have to do something else because it doesn't work for me

@dunngitter
Copy link
Contributor

Seems to be working for me as well with 3.10.4 and growik, thanks!

@BragnarXIX
Copy link

Parece que a mí también me funciona con 3.10.4 y growik, ¡gracias!

What browser are you using or how did you make it work? I can't get it to work.

@xxtensazenxx
Copy link

So what steps need to be take to "change dynamic-mode-default to growik"...? I've been looking but I cannot find it

@Rustybrickc
Copy link

Hi. I updated to commit 51c48a2. The script starts, reaches auth info input stage. I enter the data manually, but then the script does not want to work further and throws me back to the auth info input stage.
ofscraper_main_profile_2024-06-13.log

@bogdanbdg
Copy link

bogdanbdg commented Jun 13, 2024

i dont know what or where i'm supposed to put this custom values information

I placed it in the "advanced_options" block. As this is JSON, which has to be parsed into some native hash table then I presume it doesn't matter where exactly inside that block you put it. For example:

    "advanced_options": {
        "code-execution": false,
        "dynamic-mode-default": "deviint",
        "backend": "aio",
        "downloadbars": false,
        "cache-mode": "sqlite",
        "appendlog": true,
        "custom_values": {
            "DEVIINT": "https://raw.githubusercontent.com/datawhores/onlyfans-dynamic-rules/new/dynamicRules.json"
        },
        "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": ""
    },

#WORKSFORME

@Rustybrickc
Copy link

[bogdanbdg], thank you. Works for me too.

@alfratrople
Copy link

I placed it in the "advanced_options" block. As this is JSON, which has to be parsed into some native hash table then I presume it doesn't matter where exactly inside that block you put it.
#WORKSFORME

works for me now too, thank you.

@CannotTouch
Copy link

CannotTouch commented Jun 14, 2024

with the latest 3.10b commit 87ee763 and the config:

"advanced_options": {
        "code-execution": false,
        "dynamic-mode-default": "deviint",
        "backend": "aio",
        "downloadbars": true,
        "cache-mode": "sqlite",
        "appendlog": true,
        "custom_values": {
            "DEVIINT": "https://gist.github.com/datawhores/82b51e1463c2fea8286e0d41cdc35d5c"
        },
        "sanitize_text": false,

the error is:

Process SpawnProcess-2:
Traceback (most recent call last):
  File "multiprocess\process.py", line 314, in _bootstrap
  File "multiprocess\process.py", line 108, in run
  File "ofscraper\utils\logs\other.py", line 128, in inner
    target=inner,
  File "ofscraper\utils\logs\other.py", line 28, in logger_other
    log = init_other_logger(name)
          ^^^^^^^^^^^^^^^^^^^^^^^
  File "ofscraper\utils\logs\other.py", line 178, in init_other_logger
    if settings.get_log_level() != "OFF":
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "ofscraper\utils\logs\classes.py", line 124, in __init__
    self.sess = sessionManager.sessionManager(
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "ofscraper\classes\sessionmanager\sessionmanager.py", line 235, in __init__
  File "ofscraper\utils\auth\request.py", line 37, in read_request_auth
    if not result:
             ^^^^^^
  File "ofscraper\utils\auth\request.py", line 62, in get_request_auth
    else:

  File "ofscraper\utils\auth\request.py", line 106, in get_request_auth_deviint
    headers=False,
              ^^^^^
  File "httpx\_models.py", line 764, in json
  File "json\__init__.py", line 346, in loads
  File "json\decoder.py", line 337, in decode
  File "json\decoder.py", line 355, in raw_decode
json.decoder.JSONDecodeError: Expecting value: line 7 column 1 (char 6)
 [checkers.check_auth:21]  Auth Failed                                                                    checkers.py:21
For an example of how your auth file should look see
 https://of-scraper.gitbook.io/of-scraper/auth#example
If you still can't authenticate after editing from script consider manually edit the file at
C:\Users\blablabla\.config\ofscraper\main_profile\auth.json

Note: Browser Extractions only works with default browser profile

Hint: Select 'Enter Each Field Manually' to edit your current config
? Auth Menu: Select how to retrive auth information Quit
 [scrape_context.scrape_context_manager:28]                                                         scrape_context.py:28
==============================
 starting script
==============================

 [paths.temp_cleanup:42]  Cleaning up temp files                                                             paths.py:42


 [close.sendCloseMessage:41]  Finished Script                                                                close.py:41
╭───────────────────────────────────────────────── Activity Progress ──────────────────────────────────────────────────╮
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
E:\ofscraper-main>

EDIT:

but all works correctly with this commit if I use this:

"custom_values": {
           "DEVIINT": "https://raw.githubusercontent.com/datawhores/onlyfans-dynamic-rules/new/dynamicRules.json"
       },

thanks for support

@lemelomane
Copy link

lemelomane commented Jun 14, 2024

With the version 3.10.6
It used to work last week after I upgraded to 3.10.6. Today for some reason i am blocked at the auth.
I tried with manual technique and cookie helper.
I did not find the newest version of OFSCRAPER. The latest vers available is 3.10.6 https://pypi.org/project/ofscraper/

There is my config :

"advanced_options": {
"code-execution": false,
"dynamic-mode-default": "growik",
"backend": "aio",
"downloadbars": false,
"cache-mode": "sqlite",
"appendlog": true,
"custom_values": {
"DEVIINT": "https://raw.githubusercontent.com/datawhores/onlyfans-dynamic-rules/new/dynamicRules.json"
},
"sanitize_text": false,
"temp_dir": null,
"remove_hash_match": null,
"infinite_loop_action_mode": false,
"post_download_script": null,
"disable_auto_after": false,
"default_user_list": "main",
"default_black_list": ""

there is the error

starting script

[close.sendCloseMessage:41] Finished Script close.py:41
Queue <multiprocessing.queues.Queue object at 0x00000206BAB68B10> is closed
Traceback (most recent call last):
File "C:\Users\Brice13\AppData\Roaming\Python\Python311\site-packages\ofscraper\utils\logs\stdout.py", line 37, in
logger_process
messages = funct(timeout=constants.getattr("LOGGER_TIMEOUT"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ckages\ofscraper\utils\auth\request.py", line 35, in re
File "C:\Program Files\Python311\Lib\multiprocessing\queues.py", line 100, in get
raise ValueError(f"Queue {self!r} is closed")ced=forced)
ValueError: Queue <multiprocessing.queues.Queue object at 0x00000206BAB68B10> is closed

Queue <multiprocessing.queues.Queue object at 0x00000206BAB68B10> is closed
Traceback (most recent call last):
File "C:\Users\Brice13\AppData\Roaming\Python\Python311\site-packages\ofscraper\utils\logs\stdout.py", line 37, in
logger_processrs\Brice13\AppData\Roaming\Python\Python311\site-packages\ofscraper\utils\auth\request.py", line 143, in g
messages = funct(timeout=constants.getattr("LOGGER_TIMEOUT"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python311\Lib\multiprocessing\queues.py", line 100, in get
raise ValueError(f"Queue {self!r} is closed")ython311\site-packages\httpx_models.py", line 764, in json
ValueError: Queue <multiprocessing.queues.Queue object at 0x00000206BAB68B10> is closed

Queue <multiprocessing.queues.Queue object at 0x00000206BAB68B10> is closed
Traceback (most recent call last):
File "C:\Users\Brice13\AppData\Roaming\Python\Python311\site-packages\ofscraper\utils\logs\stdout.py", line 37, in
logger_processgram Files\Python311\Lib\json\decoder.py", line 340, in decode
messages = funct(timeout=constants.getattr("LOGGER_TIMEOUT"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^)
File "C:\Program Files\Python311\Lib\multiprocessing\queues.py", line 100, in get
raise ValueError(f"Queue {self!r} is closed")_

@CannotTouch
Copy link

"dynamic-mode-default": "growik",

growik don't works anymore, you need change it in deviint

@lemelomane
Copy link

"dynamic-mode-default": "growik",

growik don't works anymore, you need change it in deviint

Its worked. I changed changed in deviint as you told and its worked. Thanks you.

@kb1ibt
Copy link

kb1ibt commented Jun 21, 2024

looks like deviint got pulled cause it is showing 404 now

@Sicofra
Copy link

Sicofra commented Jun 21, 2024

3.10.6 on deviint with or without the custom value just after 2nd or 3rd entering of auth details from cookie helper progresses to blue "Activity progress" as it actually managed to log in but at that same point it dies.
Ive tried it to install fresh and fresh config

ofscraper_main_profile_2024-06-21.log

@avekifes
Copy link

Can someone give me an idea of what I'm supposed to be updating this time? All of those URLs need to be formatted into the section below?

"advanced_options": {
    "code-execution": false,
    "dynamic-mode-default": "deviint",
    "backend": "aio",
    "downloadbars": false,
    "cache-mode": "sqlite",
    "appendlog": true,
    "custom_values": {
        "DEVIINT": "https://raw.githubusercontent.com/datawhores/onlyfans-dynamic-rules/new/dynamicRules.json"
    },
    "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": "active",
    "default_black_list": ""
},

@kb1ibt
Copy link

kb1ibt commented Jun 23, 2024

The current rules might be outdated try XAGLER_URL="https://raw.githubusercontent.com/xagler/dynamic-rules/main/onlyfans.json" RAFA_URL="https://raw.githubusercontent.com/rafa-9/dynamic-rules/main/rules.json"

DIGITALCRIMINALS = ( "https://raw.githubusercontent.com/DATAHOARDERS/dynamic-rules/main/onlyfans.json" ) DATAWHORES_URL = "https://raw.githubusercontent.com/datawhores/onlyfans-dynamic-rules/main/dynamicRules.json"

Only the Datawhores and rafa-9 work, the other 2 are missing some values, like the prefix

@kb1ibt
Copy link

kb1ibt commented Jun 23, 2024

Can someone give me an idea of what I'm supposed to be updating this time? All of those URLs need to be formatted into the section below?

"advanced_options": {
    "code-execution": false,
    "dynamic-mode-default": "deviint",
    "backend": "aio",
    "downloadbars": false,
    "cache-mode": "sqlite",
    "appendlog": true,
    "custom_values": {
        "DEVIINT": "https://raw.githubusercontent.com/datawhores/onlyfans-dynamic-rules/new/dynamicRules.json"
    },
    "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": "active",
    "default_black_list": ""
},

replace the URL in the custom_values -> DEVIINT with the contents of the RAFA_URL string

@bogdanbdg
Copy link

replace the URL in the custom_values -> DEVIINT with the contents of the RAFA_URL string

Like this:

"custom_values": {
        "DEVIINT": "https://raw.githubusercontent.com/rafa-9/dynamic-rules/main/rules.json"
    },

?

Because if "yes" then this doesn't work and logs me out of OF, printing my auth.json to console on the way

@lordoffools
Copy link

So, wait, what's the latest here? Is the issue still outstanding, and/or what's the fix?

Thanks!!

@lordoffools
Copy link

For posterity, running v3.10.11 and using rafa_url works for me now.

@bogdanbdg
Copy link

For posterity, running v3.10.11 and using rafa_url works for me now.

Could you post therafa_url related part of your settings?

@lordoffools
Copy link

For posterity, running v3.10.11 and using rafa_url works for me now.

Could you post therafa_url related part of your settings?

It's the one from above.

@h3re4
Copy link

h3re4 commented Jun 28, 2024

For posterity, running v3.10.11 and using rafa_url works for me now.

Could you post therafa_url related part of your settings?

It's the one from above.

It's still broken even with the rafa-9 URL. Don't really know what is up.

  • Already uninstalled/installed to latest version
  • Still logs me out of OF
  • Last time it worked was 3.10.6 then it just stopped working from there.
  • The auth info printed on console still shows dynamic rule set to datawhores even though the config has it set to deviint

Edit: It finally worked after turning back 2FA on and editing the auth values on the terminal instead of updating the auth.json file externally.

Config:
"advanced_options": {
"code-execution": false,
"dynamic-mode-default": "rafa",
"backend": "aio",
"downloadbars": false,
"cache-mode": "sqlite",
"appendlog": true,
"custom_values": {
"RAFA_URL": "https://raw.githubusercontent.com/rafa-9/dynamic-rules/main/rules.json"
},
"sanitize_text": false,
"temp_dir": null,
"remove_hash_match": null,
"infinite_loop_action_mode": false,
"post_download_script": null,
"enable_auto_after": false,
"default_user_list": "main",
"default_black_list": ""
},

@djdylan01
Copy link

djdylan01 commented Jul 6, 2024

How do you edit the auth values on terminal like what did you type specifically because I can't update/overwrite the -dr/--dynamic-rules it's only either dc/deviint and neither are working for me and auth info still reverts back to deviint when updating the file in .config folder

This error shows up when I try to change the -dr/--dynamic-rules via terminal
OF-Scraper: error: argument -dr/--dynamic-rules: invalid choice: 'rafa' (choose from 'dc', 'deviint')

@datawhores
Copy link
Owner Author

you have to update then the latest version is
3.10.16

@alienPumpkin
Copy link

there is a bug in the recent versions config.json code, i had to go back to 3.10.17 to get it working

i was on a very old version and it recently stopped working so i found this thread. i backed up my .config to a different location, cleared out .config, and tried a fresh install of 3.10.20 but it kept making a config.json file with old properties that no longer exist. also using the CLI to edit the config.json options didn't save any of them. it had "thread_count" instead of "threads" and a few other things. if you manually edited the config.json in a text editor it would revert your changes upon starting the program.

i went back a few versions to 3.10.17 and it created the newer config.json and the cli actually applies the changes

@finnishbroccoli
Copy link

Where are the "--dynamic-rules [argument]"
argument options explained? I checked the manual, but for example I do not know if only argument change is enough or should we constantly change the configuration too.
I think it would cut questions when all information is available in one place. Now I feel I need to ask for advice every time because outdated guides can make problems worse.

@datawhores
Copy link
Owner Author

Yes the config was changed slightly recently

@datawhores
Copy link
Owner Author

datawhores commented Jul 16, 2024

You should not have to change dynamic rules frequently. I'm not sure the exact amount but they usually last for a week or more

@datawhores
Copy link
Owner Author

datawhores commented Jul 30, 2024

Where are the "--dynamic-rules [argument]" argument options explained? I checked the manual, but for example I do not know if only argument change is enough or should we constantly change the configuration too. I think it would cut questions when all information is available in one place. Now I feel I need to ask for advice every time because outdated guides can make problems worse.

The recommended method of keeping proper auth is to keep up to date with the latest version of the script
you can also join the discord, to discuss possible wide spread issues with authentication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests