matthewmueller / x-ray

The next web scraper. See through the <html> noise.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug report - img@src fails but alt works

sabatale opened this issue · comments

Describe the bug
img@src returns no value while img@alt for the same selector is working.

Expected behavior
img@src should return a link.

Actual behavior
img@src returns no value at all.

Working example code

<div id="#result" class="other-container">
  <a class="photo-container photo-1" onclick="event.preventDefault();addDataLayerPhotoViewer(16235957, 'Summary');initPhotoGallery('en', '16235957', true, '999', 2)" href="" role="button">
    <img class="" alt="My text" style="display: flex;" src="https://domain.com/media.ashx?id=ADDD250D2B6DBD6DD60939ED4B&amp;t=pi&amp;w=820&amp;h=440&amp;sm=c">
  </a>
</div>
x('https://domain.com/abc', '#result',
  [{
    img1 '.photo-1 img@src'
  }]
)

Environment: