Using Variants to extract multiple items from the same page

82 views
Skip to first unread message

Rachita Chhaparia

unread,
Dec 9, 2015, 9:13:16 AM12/9/15
to portia-scraper
I followed the steps mentioned in the document, but, however, the conversion between variants and items is not happening. Also, the output is not as desired. Many unnecessary things are getting written to the output file. Could you please suggest a solution?

Also, the output changes drastically if I change from variant 'base','1', to variant '1','2' respectively. Could you please, tell me why that is happening?

Thank you!

Ruairi Fahy

unread,
Dec 10, 2015, 3:41:26 AM12/10/15
to portia-scraper
Hi Rachita,
Can you give more information about your problem?
What guide did you follow? What page are you extracting data from? What data do you want to extract? What data is being extracted?

When you are extracting variants you need to extract them in pairs so you should be using '1' and '2' where the variant annotation at the top is variant '1' and the one at the bottom is '2'.

Rachita Chhaparia

unread,
Dec 17, 2015, 5:34:19 AM12/17/15
to portia-scraper
Hi Ruairi, 

I am trying to extract data from doctoralia.in i.e. the names of the doctors in particular. So, I guess the problem is that the page does not use <ul> or <ol> blocks for their listings. Could you tell me what should I do in such a case i.e. how can I make portia extract all data without having to annotate each item in the page? I can also make changes in the source code if required, I just currently do not understand exactly where and what I should change. 


Ruairi Fahy

unread,
Dec 18, 2015, 5:41:48 AM12/18/15
to portia-scraper
To extract all of the data you just need to annotate the data you want in the first item in the list. While annotating these click the gear icon and then make them variant #1
Then annotate the same data in the last item. While annotating these click the gear icon and then make them variant #2

Rachita Chhaparia

unread,
Dec 21, 2015, 1:54:43 AM12/21/15
to portia-scraper

I have tried doing that, but, however, it extracts only about 9 out of a list of about 15 names. 

Akash Goel

unread,
Feb 14, 2016, 1:45:13 PM2/14/16
to portia-scraper
As far as I can see, the listings are under a <div> with class="listing", and each doctor is under an <article> tag. Is this helpful?
Reply all
Reply to author
Forward
0 new messages