How many times while searching products on Flipkart have you wondered, "Oh! Why this particular filter is not here ?!"
So, wondering through the alleys of Flipkart, I faced the same problem and then started to tinker upon ways to solve it.
Well it came out quite easily.
I applied all of the available filters and when I had to apply a particular filter, I took out the html code of the present web address and then using the regex:
So, wondering through the alleys of Flipkart, I faced the same problem and then started to tinker upon ways to solve it.
Well it came out quite easily.
I applied all of the available filters and when I had to apply a particular filter, I took out the html code of the present web address and then using the regex:
"<a class=\"fk-display-block\" data-tracking-id=\"prd_title\" href=\"(.+?)\" title"
I got links of all the objects.
I scraped their html and made an array of the specifications.
Now for whatever particular filter I have to apply, I just have to search in that array. :D
I wrote a python script for it.
The link is:
hello_flipkart
Lets take an example:
Suppose I want to buy a smart phone:
I scraped their html and made an array of the specifications.
Now for whatever particular filter I have to apply, I just have to search in that array. :D
I wrote a python script for it.
The link is:
hello_flipkart
Lets take an example:
Suppose I want to buy a smart phone:
- Of company: Mi
- Having Dual Sim
But I want only dual sim mobile phones.
Now I will copy the current web page's address and use it where I have cloned my hello_flipkart's repository as
python hello_flipkart.py "<web address>" "<term to search>"
Now I will copy the current web page's address and use it where I have cloned my hello_flipkart's repository as
python hello_flipkart.py "<web address>" "<term to search>"
And I get the output:
Link of all those objects which have the desired property.
Hope it helps you!
Hope it helps you!