I'm trying to build a scraper to retrieve translations from wiktionary.
I'm calling this function that should return a list with all the translations of the argument word, but it returns an empty list.
The command response.css('ol').re(r'(?<=>)\w+(?=<)') is working on scrappy shell, though.
The word I'm using as a test is "Hallo"
def scrape_translation(word):
url = "https://en.wiktionary.org/wiki/" + word
response = HtmlResponse(url=url)
translation_list = response.css('ol').re(r'(?<=>)\w+(?=<)')
print(translation_list)
I'm using Python 3.6.4