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

Help with pointing to a specific element #16

Open
blackwaterpark22 opened this issue Feb 5, 2025 · 3 comments
Open

Help with pointing to a specific element #16

blackwaterpark22 opened this issue Feb 5, 2025 · 3 comments

Comments

@blackwaterpark22
Copy link

Hello there, I'm having a problem trying to point to a somewhat "hidden" element in this page: https://imginn.com/gothicarchitectures/

My current script is: css2rss.py ".img" "!gothicarchitectures" ~ ~ ?

I get the images and the username, but I haven't been able to correctly point to the photo description to be the 2nd part of the title, the problem being that it's not visibly displayed, but instead present as a alt text inside the img element itself

Image

Basically, is it possible to get the highlighted part to be the title 2nd part? It seems to be the only place where the photo description is present without opening the link for the photo itself, but I just don't know how to specify that I only want that part

@Owyn
Copy link
Owner

Owyn commented Feb 5, 2025

Update the script to the new version and try python css2rss.py ".img" "$found_link.find('img')['alt'][:60]" "$str(found_link.find('img'))+'<br>'+found_link.find('img')['alt']"

Image

Image

@blackwaterpark22
Copy link
Author

Oh wow, thank you so much man, that was really quick

Just a quick question to make sure I understand the reasoning, In $found_link.find('img')['alt'][:60] I'm guessing ('img') in parenthesis is the element to search in, ['alt'] in brackets is what you actually want to select and [:60] is the letter limit count?

@Owyn
Copy link
Owner

Owyn commented Feb 6, 2025

Just a quick question to make sure I understand the reasoning, In $found_link.find('img')['alt'][:60] I'm guessing ('img') in parenthesis is the element to search in, ['alt'] in brackets is what you actually want to select and [:60] is the letter limit count?

yes

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

No branches or pull requests

2 participants