OF-Scraper icon indicating copy to clipboard operation
OF-Scraper copied to clipboard

# Always show ”No accounts found during scan“

Open SSlli-b opened this issue 11 months ago • 16 comments

Describe the bug

It takes lot of time in the progress of Getting subscriptions and then fail seemlingly, but I have never set the filter before. (It works well about 1 month ago) 屏幕截图 2025-01-04 145304

To Reproduce

2025-01-04 222142

Expected behavior

Show my onlyfans following list

System Info

  • OS: [win11]
  • Browser [chrome]
  • Version [3.12.9]
  • python version 3.12.5

SSlli-b avatar Jan 04 '25 07:01 SSlli-b

Well, it would be helpful if you actually filled out the issue template properly. Because this screenshot has none of the information asked in the temple so is in no way helpful. This is like sending a picture of your cars check engine light to a mechanic saying why it is not working but giving no other helpful information.

cjb900 avatar Jan 04 '25 07:01 cjb900

This is my first time for using github and just feel sorry about this, I am not a programmer T-T

SSlli-b avatar Jan 04 '25 09:01 SSlli-b

🤦 You don't need to know how to use GitHub or be a programmer but you should at the very least know how to read the issue template before just deleting it and posting your issue. Because what you posted doesn't have any of the needed information to even begin to try and help.

cjb900 avatar Jan 04 '25 09:01 cjb900

I can't read the instruction well but try to do it

SSlli-b avatar Jan 04 '25 14:01 SSlli-b

Are you actually subscribed to a model on OF? If you are then you can try checking the debug logs and see if that has anything helpful.

cjb900 avatar Jan 04 '25 17:01 cjb900

Me too,I think it's maybe a account problem,I can't fix it after reinstall pip/pipx, ofscraper, aiolimiter, python,all of the programs.

dankeich avatar Jan 05 '25 07:01 dankeich

I was having the same problem so i ran the debug command. It seems that it could successfully fetch the usernames active offset but since then it couldn't establish connection with OF server (since the connection just reaches timeout again and again). Then it kept trying to connect and kept failing. Screenshots are listed below and hoping these could help resolve this problem. @cjb900 Fig1 Fig2

JameskinEA avatar Jan 13 '25 18:01 JameskinEA

It looks like maybe an SSL error (sorry I cannot tell as I don’t understand the language).

do you have certifi python package installed and up to date?

PsychoSid avatar Jan 13 '25 18:01 PsychoSid

I was having the same problem so i ran the debug command. It seems that it could successfully fetch the usernames active offset but since then it couldn't establish connection with OF server (since the connection just reaches timeout again and again). Then it kept trying to connect and kept failing. Screenshots are listed below and hoping these could help resolve this problem. @cjb900 Fig1 Fig2 By the way,maybe my IP is banned,my friend change a IP address and account,he hasn't any problems.

dankeich avatar Jan 13 '25 18:01 dankeich

It looks like maybe an SSL error (sorry I cannot tell as I don’t understand the language).

do you have certifi python package installed and up to date?

yep i got python 3.12.7. should i update? btw thanks so much with the ssl error suggestion. I was indeed using a vpn maybe it caused the ssl to malfunction. i'll look for how to fix the ssl. fig3

JameskinEA avatar Jan 13 '25 18:01 JameskinEA

By the way,maybe my IP is banned,my friend change a IP address and account,he hasn't any problems.

thx for the suggestion, i'll try switch ip or accounts.

JameskinEA avatar Jan 13 '25 18:01 JameskinEA

Solved this issue.

The core reason of this issue is that aiohttp and httpx were not correctly set up with proxies.

The easiest way is to modify the file ofscarper/classes/sessionmanager/sessionmanager.py with the following changes:

#Line228:

# Original codes
self._session = aiohttp.ClientSession(
    connector=aiohttp.TCPConnector(limit=self._connect_limit),
)

to

# Modified codes
self._session = aiohttp.ClientSession(
    connector=aiohttp.TCPConnector(limit=self._connect_limit),
    trust_env=True,
)

#Line236

# Original codes
self._session = httpx.AsyncClient(
    http2=True,
    proxies=self._proxy,
    limits=httpx.Limits(
        max_keepalive_connections=self._keep_alive,
        max_connections=self._connect_limit,
        keepalive_expiry=self._keep_alive_exp,
    ),
)

to

# Modified codes
self._session = httpx.AsyncClient(
    http2=True,
    proxy="http://127.0.0.1:6666", # Replace with your own proxy
    limits=httpx.Limits(
        max_keepalive_connections=self._keep_alive,
        max_connections=self._connect_limit,
        keepalive_expiry=self._keep_alive_exp,
    ),
)

#Line468

# Original codes
r = await self._aio_funct(
    method,
    url,
    timeout=aiohttp.ClientTimeout(
        total=total_timeout or self._total_timeout,
        connect=connect_timeout or self._connect_timeout,
        sock_connect=pool_connect_timeout
        or self._pool_connect_timeout,
        sock_read=read_timeout or self._read_timeout,
    ),
    headers=headers,
    cookies=cookies,
    allow_redirects=redirects,
    proxy=self._proxy,
    params=params,
    json=json,
    data=data,
    ssl=ssl.create_default_context(cafile=certifi.where()),
)

to

# Modified codes
r = await self._aio_funct(
    method,
    url,
    timeout=aiohttp.ClientTimeout(
        total=total_timeout or self._total_timeout,
        connect=connect_timeout or self._connect_timeout,
        sock_connect=pool_connect_timeout
        or self._pool_connect_timeout,
        sock_read=read_timeout or self._read_timeout,
    ),
    headers=headers,
    cookies=cookies,
    allow_redirects=redirects,
    proxy="http://127.0.0.1:6666", # Replace with your own proxy
    params=params,
    json=json,
    data=data,
    ssl=ssl.create_default_context(cafile=certifi.where()),
)

Thesharing avatar Mar 11 '25 09:03 Thesharing

Hello

i have the same issue but still show same error i debugged the script and says 403 forbidden this is the error

TRACEBACK_ [level.inner:11] 403, message='Forbidden', level.py:11 url='https://onlyfans.com/api2/v2/subscriptions/subscribes?offset=210&limit=10&type=active&format =infinite' TRACEBACK_ [level.inner:11] Traceback (most recent call last): level.py:11 File "C:\Users\your_username\AppData\Local\Programs\Python\Python311\Lib\site-packages\ofscraper\class es\sessionmanager\sessionmanager.py", line 511, in requests_async r.raise_for_status() File "C:\Users\your_username\AppData\Local\Programs\Python\Python311\Lib\site-packages\aiohttp\client_ reqrep.py", line 1093, in raise_for_status raise ClientResponseError( aiohttp.client_exceptions.ClientResponseError: 403, message='Forbidden', url='https://onlyfans.com/api2/v2/subscriptions/subscribes?offset=210&limit=10&type=active&format =infinite'

BittorB avatar Apr 02 '25 17:04 BittorB

@Thesharing @BittorB Here is the solution: https://github.com/datawhores/OF-Scraper/issues/517

In the config.json - change "backend": "aio", to "backend": "httpx", 👍

hawktank avatar Apr 02 '25 23:04 hawktank

@Thesharing @BittorB Here is the solution: #517

In the config.json - change "backend": "aio", to "backend": "httpx", 👍

Its very useful,thx.

dankeich avatar Apr 12 '25 04:04 dankeich

switching to httpx seems to help some people in some cases aiohttp has been blocked, it might be related to the version of python installed or maybe the verison of aiohttp but this is not something I have been able to look deeply into

I would try

  1. the ssl trick
  2. or switching to httpx

see if one of those methods help

datawhores avatar May 30 '25 14:05 datawhores

switching to httpx seems to help some people in some cases aiohttp has been blocked, it might be related to the version of python installed or maybe the verison of aiohttp but this is not something I have been able to look deeply into

I would try

  1. the ssl trick
  2. or switching to httpx

see if one of those methods help

Will these measures solve the problem of not being able to access subscription lists when using a VPN?

After browsing the above information, I found that I have the same problem as @JameskinEA .

By the way, I'm using 3.13.7 and still have this problem. Thx!

philospanner avatar Jul 20 '25 05:07 philospanner