0

I'm trying to find a way to fill automatically a form for a website using urllib. The website is a french buy and sell website : www.kijiji.ca Basically, my brother has a bike business and I'm trying to help him list the bikes automatically through his database. Right now I know I need to use urllib and maybe the request module, but every example I stumble on is outdated (they use python 2). Here is the listing platform : https://www.kijiji.ca/p-admarkt-post-ad.html?categoryId=648

The examples I stumble on are a bit like this one :

import urllib
import urllib2
url = 'http://whatever.foo/form.html'
form_data = {'field1': 'value1', 'field2': 'value2'}
params = urllib.urlencode(form_data)
response = urllib2.urlopen(url, params)
data = response.read()

There's no urllib2 in python 3 and I have no clue how to do this on my own... Do you guys have some references or guidance for me? Thank you!

spmegaman
  • 1
  • 2

0 Answers0