Comments (13)
I did not
Sorry my bad ill try again
from enma.
it worked
from enma.
Thank you for the report @shjee-afridi. I'm going to fix this issue
from enma.
@shjee-afridi
This bug happened once or every .random call?
can you share with me your code block?
from enma.
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.
Did you retrieve the cf_clearance from NHentai website as explained on this section?
from enma.
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.
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.
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.
yes i did its fresh token you can try the token
from enma.
from enma.
As you can, NHentai is blocking your token with 403 Forbidden
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
from enma.
Try to perform a new login or access using another browser
from enma.
Related Issues (20)
- Cloudflare JS preventing API requests HOT 1
- Problem with cookies. Status code 503 HOT 4
- AttributeError: 'Response' object has no attribute 'status' HOT 4
- use google translate to bypass https://cloudflare.com/
- You are not allowed to access this resource HOT 1
- Tags feature is not working HOT 4
- Nhentai api doesnt reflect correct created_at updated_at values HOT 2
- Enma Import Error HOT 9
- Suggestion: searching by author HOT 2
- Search method always returns page 1 no matter what page is supplied. HOT 3
- Manga object returned by nhentai.py doesn't contain characters or parodies HOT 4
- Are there any plans to support e-hentai sites? HOT 9
- Okay HOT 2
- Difference Between `get()` and `search()`? HOT 3
- Issue with cf_clearance HOT 3
- nhentai's request ends up with 404 status code HOT 2
- First example in README is outdated HOT 5
- Add page count filter HOT 1
- Get Author, Parody, and Character HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from enma.