Skip to content

Instantly share code, notes, and snippets.

@a7madM
Last active July 9, 2021 20:13
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save a7madM/c3c112711ca0d355a8dc6c812f646308 to your computer and use it in GitHub Desktop.
Save a7madM/c3c112711ca0d355a8dc6c812f646308 to your computer and use it in GitHub Desktop.
require 'uri'
require 'net/http'
require 'pp'
require 'json'
natega = File.new('natega.txt', 'w')
seat_number = 427_360 # write start seat number
count = 10
(seat_number..seat_number + count).each do |seat|
url = URI('http://natega.youm7.com/Home/GetResultStage1/')
response = Net::HTTP.post_form(url, 'SeatNumber' => seat)
record = JSON.parse(response.read_body)
natega.puts record
puts seat
end
natega.close
@a7madM
Copy link
Author

a7madM commented Jul 12, 2017

this to get natega from natega.yooum7.com

@3ss0
Copy link

3ss0 commented Jul 12, 2017

good job

@AhmedKamal20
Copy link

line 8 & 25 , number should be seatNumber ?

@AhmedKamal20
Copy link

i think line 7 should be count.times do , you didn't use count

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment