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

Bug on GoogleActiveViewElement parser #2167

Closed
mneunomne opened this issue Aug 25, 2022 · 1 comment
Closed

Bug on GoogleActiveViewElement parser #2167

mneunomne opened this issue Aug 25, 2022 · 1 comment
Assignees

Comments

@mneunomne
Copy link
Collaborator

Uncaught TypeError: Cannot read properties of null (reading 'getAttribute')
Context
https://stackoverflow.com/questions/44206782/do-i-commit-the-package-lock-json-file-created-by-npm-5

const GoogleActiveViewElement = function (elem) {
      // .GoogleActiveViewElement
      // -> .title a
      // -> .body a
      // -> .imageClk .image

      const googleDisplayAd = elem.querySelector('.GoogleActiveViewElement');
      if (!googleDisplayAd) return;

      let title = elem.querySelector(".title a, [class*=title] a")
      let body = elem.querySelector(".body a")
      let site = title
      let image = elem.querySelector(".imageClk .image")
      let url = site.getAttribute("href")
@mneunomne mneunomne self-assigned this Aug 25, 2022
dhowe added a commit that referenced this issue Aug 27, 2022
avoid exception on GoogleActiveViewElement parser
@mneunomne
Copy link
Collaborator Author

Fixed

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

No branches or pull requests

1 participant