keywords

requests xpath

Checkout

import requests

# get
source = reuqests.get(url).content

# post
data = {
    'username': 'what',
    'password': 'password'
}
source = requests.post(url, data).content
pip install lxml

from lxml import html
selector = html.fromstring(source)

info = selector.xpath('//tag[@attribute]/tag.../text()')
info = selector.xpath('//tag[@attribute]/tag.../@attribute')

results matching ""

    No results matching ""