Skip to content

Latest commit

 

History

History
22 lines (14 loc) · 493 Bytes

scrap.rst

File metadata and controls

22 lines (14 loc) · 493 Bytes

Scraping

PyQuery is able to load an html document from a url:

>>> pq(your_url)
[<html>]

By default it uses python's urllib.

If requests is installed then it will use it. This allow you to use most of requests parameters:

>>> pq(your_url, headers={'user-agent': 'pyquery'})
[<html>]

>>> pq(your_url, {'q': 'foo'}, method='post', verify=True)
[<html>]