-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Alsalam Alikom Mr. Ahmed,
I am facing a problem when I executing this code, I am new to python and webscraping .
the output comes like this only : [ ]
I have tried to troubleshoot it but I couldn't.
thank you in advance
the code:
import requests
from lxml import html
script = '''
assert(splash:go(args.url))
splash:wait(5.5)
return {
html = splash:html()
}
'''
response = requests.post(url="http://localhost:8050/run", json={
"lua_source":script,
"url":"https://axie.zone/finder?search=view_genes"
})
tree = html.fromstring(response.content)
products = tree.xpath("//div[contains(@Class,'content')]")
all_products = []
for product in products:
item = {
"Price":product.xpath(".//*[@id='search_result_container']/div[1]/a/div[7]/text()"),
}
all_products.append(item)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels