Skip to content Skip to sidebar Skip to footer

Search On Website With Python And Requests

The input from the search field:

Solution 1:

Two minor corrections and the code works for me:

import requests

body = {'query':'rune'} # <-- use 'query' not `Search'

con = requests.post('http://services.runescape.com/m=itemdb_rs/results#main-search', data=body)
print (con.content) # <-- print .content not .text

Post a Comment for "Search On Website With Python And Requests"