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

feat: third lesson about DevTools #1321

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

honzajavorek
Copy link
Collaborator

@honzajavorek honzajavorek commented Dec 6, 2024

Porting this lesson and this lesson:

  • I deliberately didn't include anything about cleaning data or iterating over the data, because it would be unnecessary load of JavaScript for a Python dev, for no obvious reason. They'll learn everything in the following lessons. I focused only on stuff which can be considered as ad-hoc inspection of the website, which is useful even to Python devs.
  • I tried to unify the style with the rest of the course. I wrote the stuff with my own words, and added standard polishing I usually do (dictionary, proofreading by AI, etc.)
  • I added several screenshots.
  • I added exercises.
  • There's no Python, so I'm not bothering Vláďa with this one.

image

@honzajavorek honzajavorek added the t-academy Issues related to Web Scraping and Apify academies. label Dec 6, 2024
@honzajavorek honzajavorek force-pushed the honzajavorek/py-devtools3 branch from 4bd5048 to 5453900 Compare January 21, 2025 09:11
@honzajavorek
Copy link
Collaborator Author

In 94b26f5 I added ul to the dictionary, because Vale wasn't happy otherwise, but I think we should set it up so that it's able to skip inline code blocks. It didn't have problems with any other inline code, so I'm not sure what's the problem - perhaps it's even a bug in Vale we should report back?

Screenshot 2025-01-21 at 15 01 49

@honzajavorek honzajavorek marked this pull request as ready for review January 21, 2025 14:07
@honzajavorek honzajavorek force-pushed the honzajavorek/py-devtools3 branch from 94b26f5 to a2f4466 Compare January 21, 2025 14:07
@mnmkng
Copy link
Member

mnmkng commented Feb 10, 2025

Hey guys, I'm sorry, but I find it really hard to find the time for the reviews. If @metalwarrior665 can't do them reasonably fast, then we need to find someone else to chip in.

Perhaps @souravjain540?

It's a shame that this great content gets stuck here for so long.

@metalwarrior665
Copy link
Member

I didn't know we were even blocking these PRs on reviews. I have done some work in the JS space recently and I would definitely want to review any change there. For Python I think @souravjain540 would make sense

@souravjain540
Copy link
Contributor

guys, I am sorry I can't promise to give my best reviews in such a busy schedule right now, considering there are really high priority time bounded projects like: the OS fair share program, PyCon Namibia: Workshop and Talk, Actor Bounty Program, PPE, and all my regular content tasks of Crawlee and others.

I can come back to give reviews after PyCon Namibia if that's okay.

@honzajavorek
Copy link
Collaborator Author

As of now I'm in no rush with this one, I got stuck on other stuff.

@TC-MO
Copy link
Contributor

TC-MO commented Mar 11, 2025

In 94b26f5 I added ul to the dictionary, because Vale wasn't happy otherwise, but I think we should set it up so that it's able to skip inline code blocks. It didn't have problems with any other inline code, so I'm not sure what's the problem - perhaps it's even a bug in Vale we should report back?
Screenshot 2025-01-21 at 15 01 49

I could've sworn that it was already set up like this. But it also should omit frontmatter and in one document it insisted to check frontmatter and throw error so ¯\_(ツ)_/¯

Copy link
Contributor

@TC-MO TC-MO left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One typo and one suggestion otherwise looks good from my point of view


![Finding child elements](./images/devtools-product-details.png)

We could either rely on the fact that the sale price is likely to be always the one which is highlighted, or that it's always the first price. For now we'll rely on the later and we'll let `querySelector()` to simply return the first result:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
We could either rely on the fact that the sale price is likely to be always the one which is highlighted, or that it's always the first price. For now we'll rely on the later and we'll let `querySelector()` to simply return the first result:
We could either rely on the fact that the sale price is likely to be always the one which is highlighted, or that it's always the first price. For now we'll rely on the latter and we'll let `querySelector()` to simply return the first result:

price.textContent;
```

It works, but the price isn't alone in the result. Before we'd use such data, we'd need to do some **data cleaning**:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sentence Before we'd... somehow feels unnatural, perhaps something like this? Also within docs I try to keep bold text only to indicate UI elements and cursive as emphasis. And it seems like here bold is used as both emphasis & to highlight UI elements, isn't that a bit confusing?

Suggested change
It works, but the price isn't alone in the result. Before we'd use such data, we'd need to do some **data cleaning**:
It works, but the price isn't alone in the result. Before using such data, we'd need to do some _data cleaning_:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t-academy Issues related to Web Scraping and Apify academies.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants