kiliman / tailwindui-crawler

tailwindui-crawler downloads the component HTML files locally
MIT License
756 stars 94 forks source link

Not logged in error #80

Closed memeree closed 10 months ago

memeree commented 10 months ago

unable to re-open issue - raising new one - same issue as the one documented in "Not logged in error #75" https://github.com/kiliman/tailwindui-crawler/issues/75

Currently using WSL, Ubuntu

kiliman commented 10 months ago

Can you copy and paste the output from the crawler?

Also, do you have all the component libraries or just some?

memeree commented 10 months ago

hi kiliman I have access to all the component libraries.

output is below:

yarn run v1.22.19
$ node index.mjs
🔐  Logging into tailwindui.com...
🔍  Fetching https://tailwindui.com/login
⏱   240ms (200)
✅  Success!

🗂   Output is ./output
🔍  Fetching https://tailwindui.com/components
⏱   251ms (200)
⏳  Processing /components/marketing/sections/heroes...
🔍  Fetching https://tailwindui.com/components/marketing/sections/heroes
⏱   297ms (200)
🚫   Not logged in
Done in 1.44s.

my redacted .env file (i assume the only special characters that needs to be escaped in the Email or Password is the '$' symbol)

EMAIL=xxxxxxxxxx@gmail.com
PASSWORD=xxxxxxxxx!xxxxxxxx!xxxxxxx
OUTPUT=./output
LANGUAGES=html,react,vue,alpine
COMPONENTS=marketing,application-ui
BUILDINDEX=1
TEMPLATES=1
kiliman commented 10 months ago

The crawler verifies you're logged in if it can find your email address in the downloaded HTML. It is case-sensitive as well. Please check that the email you're using in the .env file matches what Tailwind UI displays when you're signed in.

https://github.com/kiliman/tailwindui-crawler/blob/d3cc6ee9cf2c87145aa2943ff9c7806e4b80855c/index.mjs#L198-L203

image
memeree commented 10 months ago

ah. it was case sensitivity on the email address field - I had a capital letter in the account name e.g. Kiliman@gmail.com vs. kiliman@gmail.com I updated the account name to reflect all lowercase, and re-ran - works great.

kiliman commented 10 months ago

That's great. I should probably update the check to be case-insensitive.