Regarding datarecord pattern and download script
Sir
I am using screen scraper for taking the data from flipkart.com.I have a problem when i take the images from this site using the script
image_name = session.getVariable("IMAGE_NUMBER");
session.downloadFile( currentPage, "C:/Users/nutsuser/Desktop/images/"+ image_name +".jpg", 5, true )
and the html of this download is as follows
then there is problem shown in the screen scraper running screen
"flipkart seesion: An error occurred whil attempting to download the file at: null. The system is too busy to handle the file download at this time. "
I don't understand that is this problem in flipkart.com server or in my server or in my code.
Also there is also a problem to make datarecord pattern in this site as when we make a datarecord pattern of using this html
(As the link is this if u open this tab then u find this code near the bottom of the page
http://www.flipkart.com/green-eggs-ham-seuss-back-book-0007158467?ref=eaf480d6-d899-4968-ab29-d765659ba5a2)
<div class="item_details"><span class="product_details_keys">Book:</span> <span class="product_details_values"><b>Gone With The Wind</b></span><br />
<span class="product_details_keys">Author:</span> <span class="product_details_values"><b>Margaret Mitchell, Pat Conroy</b></span><br />
<span class="product_details_keys">ISBN:</span>
<h2 style="font-weight: bold">1416548947</h2>
<br />
<span class="product_details_keys">ISBN-13:</span>
<h2 style="font-weight: bold">9781416548942</h2>
<b>,</b>
<h2 style="font-weight: bold">978-1416548942</h2>
<br />
<span class="product_details_keys">Binding:</span> <span class="product_details_values"><b>Paperback</b></span><br />
<span class="product_details_keys">Publishing Date:</span> <span class="product_details_values"><b>May 2008</b></span><br />
<span class="product_details_keys">Publisher:</span> <span class="product_details_values"><b>Pocket Books</b></span><br />
<span class="product_details_keys">Edition:</span> <span class="product_details_values"><b>Reprint</b></span><br />
<span class="product_details_keys">Number of Pages:</span> <span class="product_details_values"><b>1448</b></span><br />
<span class="product_details_keys">Language:</span> <span class="product_details_values"><b>English</b></span><br />
</div>
Then also the datrecord pattern is not make as when we select the code from here
to
</div>
there.
Then on right click of this code the generator can not generate the datarecord pattern.so i will not be able to extract the isbn no and other information from this html.
Also if we generate the extractor pattern individual for select the middle portion on the given html just like using this(
<span class="product_details_keys">Number of Pages:</span> <span class="product_details_values"><b>1448</b></span>
)
then there is a lots set of datarecord made.and we can not get the desired result.
please give me the desired solution for download pattern and datarecord pattern so that i able to find this pattern useful for my scrapping from flipkart site.
Waiting for your kind response.
Pankaj, Regarding the issue
Pankaj,
Regarding the issue you're having with downloading images, please have a look at my response to another post on the same topic.
Regarding the issue you're having with dataRecords I would recommend that you use sub-extractor patterns here (we cover this in Tutorial 2).
I believe the resulting combination of extractor pattern and sub-extractor patterns would look like this.
Main Extractor Pattern text
Sub-extractors
<h2 style="font-weight: bold">~@ISBN@~<
<h2 style="font-weight: bold">~@ISBN13@~</h2>
...etc.
Please be sure to read up on how sub-extractors work so that you understand what is happening during your scraping session.
Hope this helps.
-Scott