-
-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
I'm attempting to run the example but am met with a error.Forbidden. I added the classes missing from the example and run but am not getting any response but the error. I tried cf_clearance from both a Firefox and a Chrome window with no change in results. I am using 2.4.4 Enma and 3.10 Python on Windows. Am I missing something in running this?
Also the documentation mentions that cf_clearance is not required by nhentai but in the function it will not accept a blank cf_clearance. Did things change and cf_clearance is once again needed?
from typing import cast
from enma import (Enma,
Sources,
CloudFlareConfig,
NHentai,
NHentaiConfig,
NhentaiSourceConfig)
enma = Enma[Sources]() # or just Enma()
config = NHentaiConfig(
cloudflare=CloudFlareConfig(
user_agent="my agent",
cf_clearance="my cf_clearance"
),
source=NhentaiSourceConfig(
tiny_image_server='t1'
) # You can specify source configs if available
)
enma.source_manager.set_source(source_name=Sources.NHENTAI)
nh_source = cast(NHentai, enma.source_manager.source)
nh_source.set_config(config=config)
doujin = enma.random()
print(doujin)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels