The following code,
training_file = BeautifulSoup("<p>with a question mark?</p>", features="lxml").prettify()
training_set = TrainingSet()
page = Page(training_file)
sample = Sample(page, {
'title': 'with a question mark?'})
training_set.add_sample(sample)
scraper = train_scraper(training_set)
Throws error
mlscraper.samples.NoMatchFoundException: No match found on page (self.page=<Page self.soup.name='[document]' classes=None, text=with a que...>, self.value='with a question mark?'
But the following code works just without the question mark in the html,
training_file = BeautifulSoup("<p>with a question mark</p>", features="lxml").prettify()
training_set = TrainingSet()
page = Page(training_file)
sample = Sample(page, {
'title': 'with a question mark'})
training_set.add_sample(sample)
scraper = train_scraper(training_set)
The following code,
Throws error
But the following code works just without the question mark in the html,