Index: feeds_crawler.admin.inc
===================================================================
--- feeds_crawler.admin.inc
+++ feeds_crawler.admin.inc
@@ -57,7 +57,16 @@
         '#description' => t('This is the XPath query that points to the \'Next\' button on the pager.'),
         '#default_value' => variable_get('feeds_crawler_xpath', ''),
       );
-
+      
+      if (module_exists('querypath')) {
+        $form['querypath'] = array(
+          '#type' => 'textfield',
+          '#title' => t('QueryPath'),
+          '#description' => t('This is the QueryPath query that points to the \'Next\' button on the pager. Leave XPath empty to use it.'),
+          '#default_value' => variable_get('feeds_crawler_querypath', ''),
+        );
+      }
+      
       $form['count'] = array(
         '#type' => 'textfield',
         '#title' => t('Number of pages'),
@@ -75,7 +84,19 @@
 }
 
 function feeds_crawler_admin_form_validate($form , &$form_state) {
-
+  if (module_exists('querypath')) {
+    if (empty($form_state['values']['xpath']) && empty($form_state['values']['querypath'])) {
+      drupal_set_message('You must set query for finding next button' ,'error');
+      drupal_set_message('You can use XPath or QueryPath' ,'warning');
+      form_set_error('xpath', t("XPath query cannot be empty."));
+      form_set_error('querypath',t('QueryPath query cannot be empty.'));
+    }
+  } 
+  else {
+    if (empty($form_state['values']['xpath'])) {
+      form_set_error('xpath', t("XPath query cannot be empty."));
+    }
+  }
 }
 
 function feeds_crawler_admin_form_submit($form, &$form_state) {
@@ -96,10 +117,17 @@
   variable_set('feeds_crawler_html', $form_state['values']['html']);
   variable_set('feeds_crawler_count', $form_state['values']['count']);
   variable_set('feeds_crawler_autodetect', $form_state['values']['autodetect']);
+  if (module_exists('querypath')) {
+    variable_set('feeds_crawler_querypath', trim($form_state['values']['querypath']));
+  }
   $offest_url = NULL;
   if ($form_state['values']['offest_url'] != '') {
     $offest_url = $form_state['values']['offest_url'];
   }
+  
+  if (module_exists('querypath') && !$xpath) {
+    variable_set('feeds_crawler_querypath_do', 1);
+  }
 
   $batch = array(
     'title' => t('Crawling %count pages.', array('%count' => $form_state['values']['count'])),
Index: feeds_crawler.module
===================================================================
--- feeds_crawler.module
+++ feeds_crawler.module
@@ -99,6 +99,18 @@
     $xpath = 'link[@rel="next"]';
   }
 
+  if (module_exists('querypath') && variable_get('feeds_crawler_querypath_do', 0)) {
+    $qp = htmlqp($raw, variable_get('feeds_crawler_querypath', ''));
+    $href = $qp->attr('href');
+    if ($href === FALSE || empty($href)) {
+      return FALSE;
+    }
+    if (strpos($href, 'http') !== 0) {
+      $href = $base_url . $href;
+    }
+    return $href;
+  }
+  
   $href = $xml->xpath($xpath);
   unset($xml);
 
