Code Monkey home page Code Monkey logo

Comments (13)

shjee-afridi avatar shjee-afridi commented on August 27, 2024 1

I did not
Sorry my bad ill try again

from enma.

shjee-afridi avatar shjee-afridi commented on August 27, 2024 1

it worked

from enma.

AlexandreSenpai avatar AlexandreSenpai commented on August 27, 2024

Thank you for the report @shjee-afridi. I'm going to fix this issue

from enma.

AlexandreSenpai avatar AlexandreSenpai commented on August 27, 2024

@shjee-afridi
This bug happened once or every .random call?
can you share with me your code block?

from enma.

shjee-afridi avatar shjee-afridi commented on August 27, 2024

I just try to run the code snippet you provided in read me

`from typing import cast
from enma import Enma, DefaultAvailableSources, CloudFlareConfig, NHentai, Sort

enma = EnmaDefaultAvailableSources

config = CloudFlareConfig(
user_agent='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36',
cf_clearance=''
)

enma.source_manager.set_source(source_name='nhentai')
nh_source = cast(NHentai, enma.source_manager.source)
nh_source.set_config(config=config)

doujin = enma.random()
print(doujin)`

from enma.

AlexandreSenpai avatar AlexandreSenpai commented on August 27, 2024

Did you retrieve the cf_clearance from NHentai website as explained on this section?

from enma.

AlexandreSenpai avatar AlexandreSenpai commented on August 27, 2024

Cool, i'm closing this issue. But i'm going to work to expose clearly this kind of errors on the next release.
Thanks for using and supporting Enma ( ̄︶ ̄*))

from enma.

shjee-afridi avatar shjee-afridi commented on August 27, 2024

same error again

AttributeError: 'NoneType' object has no attribute 'text'
from enma import Enma, DefaultAvailableSources, CloudFlareConfig, NHentai, Sort

enma = Enma[DefaultAvailableSources]()

config = CloudFlareConfig(
    user_agent='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36',
    cf_clearance='U59IPgDBmnusZw5WP9f4vNR6fn6zoE7Fe8UAu6yi4Qw-1708788071-1.0-AaGWJxPmBVhQcCnsoNByVuKxsakAszIqOEsIlUjP5eLDwUnk8bKa9kId4CEOnlsoS2l9+SeE2zHbcBXtVZJiPHk='
)

enma.source_manager.set_source(source_name='nhentai')
nh_source = cast(NHentai, enma.source_manager.source)
nh_source.set_config(config=config)

doujin = enma.random()
print(doujin)```

from enma.

AlexandreSenpai avatar AlexandreSenpai commented on August 27, 2024

Hello, did you refreshed the cf_clearance? This token has an expiration time. When it happens you need to get a new token from Nhentai website

from enma.

shjee-afridi avatar shjee-afridi commented on August 27, 2024

yes i did its fresh token you can try the token

from enma.

shjee-afridi avatar shjee-afridi commented on August 27, 2024

2

from enma.

AlexandreSenpai avatar AlexandreSenpai commented on August 27, 2024

As you can, NHentai is blocking your token with 403 Forbidden

image

You can check it out enabling enma logs doing as shown below

from enma import Enma, CloudFlareConfig, LogMode, logger

enma = Enma()

logger.mode = LogMode.DEBUG

enma.source_manager.set_source(source_name='nhentai')
enma.source_manager.source.set_config(config=CloudFlareConfig(user_agent='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36',
                                                              cf_clearance='U59IPgDBmnusZw5WP9f4vNR6fn6zoE7Fe8UAu6yi4Qw-1708788071-1.0-AaGWJxPmBVhQcCnsoNByVuKxsakAszIqOEsIlUjP5eLDwUnk8bKa9kId4CEOnlsoS2l9+SeE2zHbcBXtVZJiPHk='))

random_doujin = enma.random()
print(random_doujin)

Using the token that i just got from Nhentai Website it goes ok

image
image

from enma.

AlexandreSenpai avatar AlexandreSenpai commented on August 27, 2024

Try to perform a new login or access using another browser

from enma.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.