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

AttributeError: 'NoneType' object has no attribute 'find_all' #2

Open
Johann-gif opened this issue Nov 2, 2021 · 8 comments
Open
Assignees
Labels
question Further information is requested

Comments

@Johann-gif
Copy link

Hello, is there a version compatible with the new version of Webtoon website?
image

@alumag
Copy link
Owner

alumag commented Nov 2, 2021

Hey @Johann-gif , it seems like the ReleaseHook and WeeklyHotHook still work as intended with python 3.6.6 and python 3.7, would you like to try this python version?

image

@alumag alumag self-assigned this Nov 2, 2021
@alumag alumag added help wanted Extra attention is needed question Further information is requested and removed help wanted Extra attention is needed labels Nov 2, 2021
@Johann-gif
Copy link
Author

It does not work for me despite python in 3.6.6...see attachment
image
This error comes from the package obtained with the command pip install WebtoonHooks

@alumag
Copy link
Owner

alumag commented Nov 2, 2021

I didn't succeed to reproduce the bug, I've tried to install the package on multiple environments and it works just fine.

However, I have a few guesses. it seems like the div tags with the class daily_section _list_<DAY IN CAPITAL> are not found when you are downloading the page https://www.webtoons.com/en/dailySchedule on your environment, while these classes still exist in the new website.

  1. Please provide the output for pip list, I would like to check the versions of beautifulsoup4 and lxml. I use the latest versions, but the project run since 2019...
  2. In get_daily_releases function, debug and check the CSS class name at line 84. It should be equal (today) to daily_section _list_TUESDAY.
  3. Try to change line 84 to daily = soup.find("div", {'class': "daily_section _list_" + day.upper()}), basically add another whitespace between the class names.
  4. Save the output of Session.get_page("dailySchedule") and upload here. We will debug it together :)

I'm sorry I couldn't find a quick solution, I hope it helps
Happy debugging!

@alumag
Copy link
Owner

alumag commented Nov 3, 2021

Found the problem, you need to set the locale time to English:

import locale
locale.setlocale(locale.LC_ALL, 'en.utf8')

@alumag alumag closed this as completed Nov 3, 2021
@Johann-gif
Copy link
Author

it doesn't work with the locale time to English either.
image
See the version of beautifulsoup4 and lxml down below
image
I am French, so it is possible that there are new issues not identified.
I already ran into the problem when I cloned a project to download images from the website, I had to change 30% of the project to work on my end, largely due to the age verification page.
I will try to debug on my side, do not hesitate to give me a feedback in the meantime if you find a solution.

@Johann-gif
Copy link
Author

As i thought, the age verification page is the problem.
The header provided in the code is not sufficient to bypass the age verification page, in my other project the only solution I could find was to enter all my browsing cookies manually with jar = requests.cookies.RequestsCookieJar () and jar.set('blabla', 'blabla', domain='.webtoons.com', path='/') and addings.headers.update ({'referer': 'https://www.webtoons.com/en/gdpr/ageGate'}), is there a way to do it more cleanly?
image

@alumag
Copy link
Owner

alumag commented Nov 6, 2021

Bypassing the age gate by automation is not a task I'm willing to do, It will make this small project too complex. however, It seems that the age gate is active only in Europe (because of GDPR), I've tested it with VPN, which explains why I couldn't reproduce the bug (I'm from Israel).
Try to use a VPN, I found that I can't reach the age gate from Israel, South Korea, India, Canada... basically any VPN server outside Europe should do the work for you :)

@alumag alumag reopened this Nov 6, 2021
@Johann-gif
Copy link
Author

Hello,
I tried again using a vpn (protonVPN) passing through the United States.
I manage to receive the hot of the week embed but not that of the daily schedule.
The text seems too long for the embed, have you encountered this error on your end?
image

python
>>> import WebtoonHooks
>>> release = WebtoonHooks.ReleaseHook()

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

No branches or pull requests

2 participants