Python: Get html table data by xpath
问题 I feel that extracting data from html tables is extremely difficult and requires custom build for each site.. I would very much like to be proved wrong here.. Is there an simple pythonic way to extract strings and numbers out of a website by just using the url and xpath of the table of interest? Example: url_str = 'http://www.fdmbenzinpriser.dk/searchprices/5/' xpath_str = //*[@id="sortabletable"] I once had a script that could fetch data from this site. But lost it. As I recall it I was