matthewmueller / x-ray

The next web scraper. See through the <html> noise.
MIT License
5.86k stars 350 forks source link

Is getting scoped tag name possible ? #389

Open mohit-singh-pepper opened 1 year ago

mohit-singh-pepper commented 1 year ago
<p class='whatever'>Hello !</p>

For above html, something like following.

x('.whatever', [
  {
     name: '@tag',
     text: ''
  }
])

Should return

[
  {
    "name": "p",
    "text": "Hello !"
  }
]