input: Write a python function to extract titles and URLs of articles from a given HTML using Scrapy.
  assert extract_articles('<html><body><article><h2>Article 1</h2><a href="url1"></a></article><article><h2>Article 2</h2><a href="url2"></a></article></body></html>') == [{'title': 'Article 1', 'url': 'url1'}, {'title': 'Article 2', 'url': 'url2'}]
  assert extract_articles('<html><body><article><h2>Title A</h2><a href="linkA"></a></article></body></html>') == [{'title': 'Title A', 'url': 'linkA'}]
  assert extract_articles('<html><body></body></html>') == []
output: def extract_articles(html):
      from scrapy import Selector
      sel = Selector(text=html)
      articles = []
      for article in sel.xpath('//article'):
          title = article.xpath('.//h2/text()').get()
          url = article.xpath('.//a/@href').get()
          if title and url:
              articles.append({'title': title, 'url': url})
      return articles