This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from lxml import html | |
class YandexRespParser(object): | |
__RESULTS_ON_PAGE = 10 #Its possible to evaluate this number from first result page | |
def __create_rep(self, result_element): | |
rep = {} | |
rep["index"] = int(result_element.xpath('.//b[@class="b-serp-item__number"]')[0].text_content()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem install ruby-debug-ide --pre | |
gem install ruby-debug-base19x --pre |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$._data( elem ).events |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. So edit the gems/rmagick-2.13.1/ext/RMagick/extconf.rb file at #171 and #178 like below: "`identify -version` =~ /Version: ImageMagick (\d+\.\d+\.\d+)-\d+ /" | |
2.1) Ruby => http://rubyforge.org/frs/download.php/74298/rubyinstaller-1.9.2-p180.exe | |
2) DevKit => http://github.com/downloads/oneclick/rubyinstaller/DevKit-tdm-32-4.5.1-20101214-1400-sfx.exe | |
3) ImageMagick => http://www.imagemagick.org/download/binaries/ImageMagick-6.6.7-9-Q16-windows-dll.exe !!!!!32bits | |
4) RMagick => https://github.com/rmagick/rmagick/zipball/master | |
5) type-windows.xml => http://www.imagemagick.org/source/type-windows.xml | |
3. 1) Ruby => c:\Ruby192 | |
2) DevKit => c:\DevKit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If you have a libxml2.dll, try copying over to libxml2-2.dll and see if that solves your problem. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem 'activerecord', '4.0.0' | |
require 'active_record' | |
require 'minitest/autorun' | |
require 'logger' | |
gem "schema_plus" | |
require 'schema_plus' | |
# This connection will do for database-independent bug reports. | |
ActiveRecord::Base.establish_connection( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Activate the gem you are reporting the issue against. | |
gem 'activerecord', '4.0.0' | |
require 'active_record' | |
require 'minitest/autorun' | |
require 'logger' | |
# This connection will do for database-independent bug reports. | |
ActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: ':memory:') | |
ActiveRecord::Base.logger = Logger.new(STDOUT) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gemfile_path = "#{File.basename(__FILE__, '.rb')}.gemfile" | |
ENV['BUNDLE_GEMFILE'] = File.expand_path(gemfile_path) | |
unless File.exists?(gemfile_path) | |
File.write(gemfile_path, <<-GEMFILE) | |
source 'https://rubygems.org' | |
gem 'rails', '4.0.0' | |
gem 'sqlite3' | |
GEMFILE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gemfile_path = "#{File.basename(__FILE__, '.rb')}.gemfile" | |
ENV['BUNDLE_GEMFILE'] = File.expand_path(gemfile_path) | |
unless File.exists?(gemfile_path) | |
File.write(gemfile_path, <<-GEMFILE) | |
source 'https://rubygems.org' | |
gem 'rails', '4.0.0' | |
gem 'sqlite3' | |
GEMFILE |