posting_zon 3.88.799 → 3.89.799

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/posting_zon.rb +238 -290
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 865af3a099c02918e506d7954e20fb291edac1c448866a7477bb90c88f928516
4
- data.tar.gz: 7800a12f7ad9c1af8a89e81cf614d280f97ee4f5b917a71be1e225bf171add0c
3
+ metadata.gz: a609f187dea3248f7acd1a8627d632559369580e39afdbcfa3564dec059ad563
4
+ data.tar.gz: 38d310816a7cf5e7d765ab420ec1616c9992912a96f9bf2f4bf19c5ed9d16d4d
5
5
  SHA512:
6
- metadata.gz: a810cbc9ac581a0656fca5ee5080f28f05330cffbc5fa6848baac0b8342a5439953db3f243f85c2c021b413021ceb9eaa898b52428ed4100ef5a90824d61aca1
7
- data.tar.gz: ef5190ea2582edc6478b250248fcb2c0f32b9cd238b8ed277624bbd9f009dd361e3591fb38762d4213a1f27a3251ebbfddf60964d06d5433c3002838281ea145
6
+ metadata.gz: a3857a6c35f24828e3b55443ebb559e1f0365d64ff263e108a6afffcc2670c3828b007f7e0a5ca89762b6efa13b07d01cf25bd6213847e9bdab47c8fadf08ccb
7
+ data.tar.gz: 260b87a32dff67e261327918c4eb12ffb5eab0348c8895059aeb755e3fb7cf7a70af34059038d3a875a186414db24f7b6a4a3233fc1fcf5b335394c510a0a3e3
data/lib/posting_zon.rb CHANGED
@@ -223,179 +223,127 @@ class Naver
223
223
 
224
224
  chrome_start(proxy, board_cookie_dir)
225
225
 
226
- # 열린 모든 탭 핸들 확인
227
- all_windows = @driver.window_handles
228
- #puts "현재 열려 있는 탭 수: #{all_windows.size}" # 열린 탭 수 출력
229
-
230
- # 원하는 URL
231
- target_url = "https://chromewebstore.google.com/detail/captcha-solver-auto-recog/ifibfemgeogfhoebkmokieepdoobkbpo?hl=ko"
232
-
233
- # 각 탭을 순회하면서
234
- all_windows.each do |window|
235
- @driver.switch_to.window(window)
236
- current_url = @driver.current_url
237
- #puts "탭 URL: #{current_url}" # 각 탭 URL 출력
226
+ # 열린 모든 탭 핸들 확인
227
+ all_windows = @driver.window_handles
228
+ #puts "현재 열려 있는 탭 수: #{all_windows.size}" # 열린 탭 수 출력
229
+
230
+ # 원하는 URL
231
+ target_url = "https://chromewebstore.google.com/detail/captcha-solver-auto-recog/ifibfemgeogfhoebkmokieepdoobkbpo?hl=ko"
232
+
233
+ # 각 탭을 순회하면서
234
+ all_windows.each do |window|
235
+ @driver.switch_to.window(window)
236
+ current_url = @driver.current_url
237
+ #puts "탭 URL: #{current_url}" # 각 탭 URL 출력
238
238
 
239
- # 원하는 URL이 아니면 탭을 닫기
240
- if current_url != target_url
241
- begin
242
- @driver.close # 다른 탭을 닫기
243
- rescue Selenium::WebDriver::Error::WebDriverError => e
244
- #puts "탭을 닫는 데 오류 발생: #{e.message}"
245
- end
246
- end
247
- end
239
+ # 원하는 URL이 아니면 탭을 닫기
240
+ if current_url != target_url
241
+ begin
242
+ @driver.close # 다른 탭을 닫기
243
+ rescue Selenium::WebDriver::Error::WebDriverError => e
244
+ #puts "탭을 닫는 데 오류 발생: #{e.message}"
245
+ end
246
+ end
247
+ end
248
248
 
249
- # 남아 있는 탭으로 전환
250
- all_windows = @driver.window_handles # 남은 탭 리스트 갱신
251
- if all_windows.size > 0
252
- @driver.switch_to.window(all_windows.first) # 남아 있는 첫 번째 탭으로 전환
253
- else
254
- #puts "남은 탭이 없습니다."
255
- end
249
+ # 남아 있는 탭으로 전환
250
+ all_windows = @driver.window_handles # 남은 탭 리스트 갱신
251
+ if all_windows.size > 0
252
+ @driver.switch_to.window(all_windows.first) # 남아 있는 첫 번째 탭으로 전환
253
+ else
254
+ #puts "남은 탭이 없습니다."
255
+ end
256
256
 
257
257
 
258
258
 
259
259
 
260
- sleep(1)
261
- begin
260
+ sleep(1)
261
+ begin
262
262
  wait = Selenium::WebDriver::Wait.new(:timeout => 3)
263
263
  wait.until { @driver.find_element(xpath: '//section[@class="lwrbTd"]//button[@jsname="ajZLRd"]') } #추가 되어 있음
264
264
  check_cookie_login = 1
265
265
  puts'[Step.01] CAPTCHA 세션 및 브라우저 설정 완료 상태 확인!!.......'.yellow
266
- rescue
267
- begin
268
- wait = Selenium::WebDriver::Wait.new(:timeout => 3)
269
- wait.until { @driver.find_element(xpath: '//section[@class="lwrbTd"]//button[@jsname="wQO0od"]') } #추가 안되어 있음
270
- sleep(1.5)
271
- @driver.find_element(xpath: '//section[@class="lwrbTd"]//button[@jsname="wQO0od"]').click
272
- puts'[Step.01] CAPTCHA 세션 연결 없음!! 브라우저 필요 설정 미 완료 상태!!.......'.red
273
- puts'[Step.02] CAPTCHA 세션 연결 및 브라우저 필요 설정 진행 시작!!.......'.red
274
- sleep(1.5)
275
- shell = WIN32OLE.new('WScript.Shell')
276
- shell.AppActivate("Captcha Solver: Auto Recognition and Bypass")
277
- shell.AppActivate("Captcha Solver: Auto Recognition and Bypass")
278
- sleep(1)
279
- shell.SendKeys("{TAB}")
280
- sleep(0.5)
281
- shell.SendKeys("{ENTER}")
282
-
283
- check_cookie_login = 0
284
- sleep(1)
285
- rescue
286
- @driver.quit
287
- return 0
288
- end
289
- end
266
+ rescue
267
+ begin
268
+ wait = Selenium::WebDriver::Wait.new(:timeout => 3)
269
+ wait.until { @driver.find_element(xpath: '//section[@class="lwrbTd"]//button[@jsname="wQO0od"]') } #추가 안되어 있음
270
+ sleep(1.5)
271
+ @driver.find_element(xpath: '//section[@class="lwrbTd"]//button[@jsname="wQO0od"]').click
272
+ puts'[Step.01] CAPTCHA 세션 연결 없음!! 브라우저 필요 설정 미 완료 상태!!.......'.red
273
+ puts'[Step.02] CAPTCHA 세션 연결 및 브라우저 필요 설정 진행 시작!!.......'.red
274
+ sleep(1.5)
275
+ shell = WIN32OLE.new('WScript.Shell')
276
+ shell.AppActivate("Captcha Solver: Auto Recognition and Bypass")
277
+ shell.AppActivate("Captcha Solver: Auto Recognition and Bypass")
278
+ sleep(1)
279
+ shell.SendKeys("{TAB}")
280
+ sleep(0.5)
281
+ shell.SendKeys("{ENTER}")
282
+
283
+ check_cookie_login = 0
284
+ sleep(1)
285
+ rescue
286
+ @driver.quit
287
+ return 0
288
+ end
289
+ end
290
290
 
291
- if check_cookie_login == 0
291
+ if check_cookie_login == 0
292
292
 
293
- begin
294
-
295
- begin
296
- # 최대 20초 동안 확장 프로그램 탭이 열릴 때까지 대기
297
- extension_url = 'chrome-extension://ifibfemgeogfhoebkmokieepdoobkbpo/options/options.html'
298
- max_wait_time = 20
299
- waited = 0
300
- found = false
301
-
302
- while waited < max_wait_time
303
- all_windows = @driver.window_handles
304
- all_windows.each do |window|
305
- @driver.switch_to.window(window)
306
- current_url = @driver.current_url
307
- if current_url.include?(extension_url)
308
- found = true
309
- break
310
- end
311
- end
312
- break if found
313
-
314
- sleep(3)
315
- waited += 1
316
- end
317
-
318
- if found
319
- # 확장 프로그램 탭을 제외한 나머지 탭 닫기
320
- all_windows = @driver.window_handles
321
- all_windows.each do |window|
322
- @driver.switch_to.window(window)
323
- current_url = @driver.current_url
324
- if !current_url.include?(extension_url)
325
- sleep(2)
326
- @driver.close
327
- sleep(2)
328
- end
329
- end
330
-
331
- # 확장 프로그램 탭으로 전환
332
- remaining_windows = @driver.window_handles
333
- if remaining_windows.size > 0
334
- @driver.switch_to.window(remaining_windows.first)
335
- end
336
- else
337
- puts "초기 작업 브라우저가 완벽하게 세팅 되지 않았습니다.".red
338
- puts "C드라이브에서 scraping_cookie 폴더 삭제 후 다시 시작해주세요.".red
339
- end
340
-
341
- rescue => e
342
- puts "초기 작업 브라우저가 완벽하게 세팅 되지 않았습니다.".red
343
- puts "C드라이브에서 scraping_cookie 폴더 삭제 후 다시 시작해주세요.".red
344
- @driver.quit if @driver
345
- end
346
-
347
-
348
-
349
-
350
-
351
- begin
293
+ begin
294
+
352
295
  @driver.get('chrome-extension://ifibfemgeogfhoebkmokieepdoobkbpo/options/options.html')
353
- sleep(1)
354
- # 요소 찾기 타임아웃을 10초로 설정
355
- wait = Selenium::WebDriver::Wait.new(:timeout => 5)
356
- #요소가 나타날 때까지 60초 동안 기다립니다.
357
- wait.until { @driver.find_element(:xpath, '/html/body/div/div[1]/table/tbody/tr[1]/td[2]/input') }
358
- @driver.find_element(:xpath, '/html/body/div/div[1]/table/tbody/tr[1]/td[2]/input').click
359
- sleep(1)
360
- Clipboard.copy(captcha_key)
361
- @driver.action.key_down(:control).send_keys('v').key_up(:control).perform
362
- sleep(1)
363
- @driver.find_element(:xpath, '//*[@id="connect"]').click
364
- sleep(1)
296
+ sleep(5)
297
+
298
+ begin
299
+ @driver.get('chrome-extension://ifibfemgeogfhoebkmokieepdoobkbpo/options/options.html')
300
+ sleep(1)
301
+ # 요소 찾기 타임아웃을 10초로 설정
302
+ wait = Selenium::WebDriver::Wait.new(:timeout => 5)
303
+ #요소가 나타날 때까지 60초 동안 기다립니다.
304
+ wait.until { @driver.find_element(:xpath, '/html/body/div/div[1]/table/tbody/tr[1]/td[2]/input') }
305
+ @driver.find_element(:xpath, '/html/body/div/div[1]/table/tbody/tr[1]/td[2]/input').click
306
+ sleep(1)
307
+ Clipboard.copy(captcha_key)
308
+ @driver.action.key_down(:control).send_keys('v').key_up(:control).perform
309
+ sleep(1)
310
+ @driver.find_element(:xpath, '//*[@id="connect"]').click
311
+ sleep(1)
365
312
 
366
- begin
367
- wait = Selenium::WebDriver::Wait.new(:timeout => 10)
368
- wait.until do
369
- begin
370
- alert = @driver.switch_to.alert
371
- alert.accept
372
- sleep(1)
373
- true
374
- rescue Selenium::WebDriver::Error::NoSuchAlertError
375
- false
376
- end
377
- end
378
- rescue Selenium::WebDriver::Error::TimeoutError
379
- @driver.find_element(:xpath, '//*[@id="connect"]').click
380
- begin
381
- wait = Selenium::WebDriver::Wait.new(:timeout => 10)
382
- wait.until do
383
- begin
384
- alert = @driver.switch_to.alert
385
- alert.accept
386
- sleep(1)
387
- true
388
- rescue Selenium::WebDriver::Error::NoSuchAlertError
389
- false
390
- end
391
- end
392
- rescue Selenium::WebDriver::Error::TimeoutError
393
- puts "초기 작업 브라우저가 완벽하게 세팅 되지 않았습니다.".red
394
- puts "C드라이브에서 scraping_cookie 폴더 삭제 후 다시 시작해주세요.".red
395
- system('taskkill /F /IM chrome.exe')
396
- @driver.quit if @driver
397
- end
398
- end
313
+ begin
314
+ wait = Selenium::WebDriver::Wait.new(:timeout => 10)
315
+ wait.until do
316
+ begin
317
+ alert = @driver.switch_to.alert
318
+ alert.accept
319
+ sleep(1)
320
+ true
321
+ rescue Selenium::WebDriver::Error::NoSuchAlertError
322
+ false
323
+ end
324
+ end
325
+ rescue Selenium::WebDriver::Error::TimeoutError
326
+ @driver.find_element(:xpath, '//*[@id="connect"]').click
327
+ begin
328
+ wait = Selenium::WebDriver::Wait.new(:timeout => 10)
329
+ wait.until do
330
+ begin
331
+ alert = @driver.switch_to.alert
332
+ alert.accept
333
+ sleep(1)
334
+ true
335
+ rescue Selenium::WebDriver::Error::NoSuchAlertError
336
+ false
337
+ end
338
+ end
339
+ rescue Selenium::WebDriver::Error::TimeoutError
340
+ puts "초기 작업 브라우저가 완벽하게 세팅 되지 않았습니다.".red
341
+ puts "C드라이브에서 scraping_cookie 폴더 삭제 후 다시 시작해주세요.".red
342
+ system('taskkill /F /IM chrome.exe')
343
+ @driver.quit if @driver
344
+ end
345
+ end
346
+
399
347
  puts '-[√] 브라우저 필요 설정 1차 시도.......'.green
400
348
  @driver.manage.window.maximize
401
349
  sleep(2)
@@ -431,64 +379,64 @@ class Naver
431
379
  key_stroke('enter')
432
380
  sleep(1)
433
381
 
434
- rescue
435
- begin
436
- sleep(1)
437
- @driver.get('chrome-extension://ifibfemgeogfhoebkmokieepdoobkbpo/options/options.html')
438
- sleep(1)
439
- # 요소 찾기 타임아웃을 10초로 설정
440
- wait = Selenium::WebDriver::Wait.new(:timeout => 5)
441
- #요소가 나타날 때까지 60초 동안 기다립니다.
442
- wait.until { @driver.find_element(:xpath, '//*[@name="apiKey"]') }
443
- @driver.find_element(:xpath, '//*[@name="apiKey"]').click
444
- sleep(1)
445
- begin
446
- @driver.find_element(:xpath, '//*[@name="apiKey"]').click
447
- rescue
448
- end
449
-
450
- Clipboard.copy(captcha_key)
451
- @driver.action.key_down(:control).send_keys('v').key_up(:control).perform
452
- sleep(1)
453
- begin
454
- @driver.find_element(:xpath, '//*[@class="default-btn"]').click
455
- sleep(1)
456
-
457
- begin
458
- wait = Selenium::WebDriver::Wait.new(:timeout => 10)
459
- wait.until do
460
- begin
461
- alert = @driver.switch_to.alert
462
- alert.accept
463
- sleep(1)
464
- true
465
- rescue Selenium::WebDriver::Error::NoSuchAlertError
466
- false
467
- end
468
- end
469
- rescue Selenium::WebDriver::Error::TimeoutError
470
-
471
- @driver.find_element(:xpath, '//*[@class="default-btn"]').click
472
- begin
473
- wait = Selenium::WebDriver::Wait.new(:timeout => 10)
474
- wait.until do
475
- begin
476
- alert = @driver.switch_to.alert
477
- alert.accept
478
- sleep(1)
479
- true
480
- rescue Selenium::WebDriver::Error::NoSuchAlertError
481
- false
482
- end
483
- end
484
-
485
- rescue Selenium::WebDriver::Error::TimeoutError
486
- puts "초기 작업 브라우저가 완벽하게 세팅 되지 않았습니다.".red
487
- puts "C드라이브에서 scraping_cookie 폴더 삭제 후 다시 시작해주세요.".red
488
- system('taskkill /F /IM chrome.exe')
489
- @driver.quit if @driver
490
- end
491
- end
382
+ rescue
383
+ begin
384
+ sleep(1)
385
+ @driver.get('chrome-extension://ifibfemgeogfhoebkmokieepdoobkbpo/options/options.html')
386
+ sleep(1)
387
+ # 요소 찾기 타임아웃을 10초로 설정
388
+ wait = Selenium::WebDriver::Wait.new(:timeout => 5)
389
+ #요소가 나타날 때까지 60초 동안 기다립니다.
390
+ wait.until { @driver.find_element(:xpath, '//*[@name="apiKey"]') }
391
+ @driver.find_element(:xpath, '//*[@name="apiKey"]').click
392
+ sleep(1)
393
+ begin
394
+ @driver.find_element(:xpath, '//*[@name="apiKey"]').click
395
+ rescue
396
+ end
397
+
398
+ Clipboard.copy(captcha_key)
399
+ @driver.action.key_down(:control).send_keys('v').key_up(:control).perform
400
+ sleep(1)
401
+ begin
402
+ @driver.find_element(:xpath, '//*[@class="default-btn"]').click
403
+ sleep(1)
404
+
405
+ begin
406
+ wait = Selenium::WebDriver::Wait.new(:timeout => 10)
407
+ wait.until do
408
+ begin
409
+ alert = @driver.switch_to.alert
410
+ alert.accept
411
+ sleep(1)
412
+ true
413
+ rescue Selenium::WebDriver::Error::NoSuchAlertError
414
+ false
415
+ end
416
+ end
417
+ rescue Selenium::WebDriver::Error::TimeoutError
418
+
419
+ @driver.find_element(:xpath, '//*[@class="default-btn"]').click
420
+ begin
421
+ wait = Selenium::WebDriver::Wait.new(:timeout => 10)
422
+ wait.until do
423
+ begin
424
+ alert = @driver.switch_to.alert
425
+ alert.accept
426
+ sleep(1)
427
+ true
428
+ rescue Selenium::WebDriver::Error::NoSuchAlertError
429
+ false
430
+ end
431
+ end
432
+
433
+ rescue Selenium::WebDriver::Error::TimeoutError
434
+ puts "초기 작업 브라우저가 완벽하게 세팅 되지 않았습니다.".red
435
+ puts "C드라이브에서 scraping_cookie 폴더 삭제 후 다시 시작해주세요.".red
436
+ system('taskkill /F /IM chrome.exe')
437
+ @driver.quit if @driver
438
+ end
439
+ end
492
440
 
493
441
  puts '-[√] 브라우저 필요 설정 1차 시도.......'.green
494
442
  @driver.manage.window.maximize
@@ -525,88 +473,88 @@ class Naver
525
473
  key_stroke('enter')
526
474
  sleep(1)
527
475
 
528
- rescue => e
529
- @driver.window_handles.each do |handle|
530
- @driver.switch_to.window(handle)
531
- begin
532
- # 로딩 중이거나, 페이지가 완전히 로딩되지 않더라도 탭을 닫기
533
- @driver.close
534
- rescue Selenium::WebDriver::Error::WebDriverError => e
535
- puts "초기 작업 브라우저가 완벽하게 세팅 되지 않았습니다.".red
536
- puts "C드라이브에서 scraping_cookie 폴더 삭제 후 다시 시작해주세요.".red
537
- end
538
- end
539
- return 0
540
- @driver.quit
541
- end
542
-
543
-
544
- rescue => e
545
- puts "초기 작업 브라우저가 완벽하게 세팅 되지 않았습니다.".red
546
- puts "C드라이브에서 scraping_cookie 폴더 삭제 후 다시 시작해주세요.".red
547
- @driver.window_handles.each do |handle|
548
- @driver.switch_to.window(handle)
549
- begin
550
- # 로딩 중이거나, 페이지가 완전히 로딩되지 않더라도 탭을 닫기
551
- @driver.close
552
- rescue Selenium::WebDriver::Error::WebDriverError => e
553
- puts "초기 작업 브라우저가 완벽하게 세팅 되지 않았습니다.".red
554
- puts "C드라이브에서 scraping_cookie 폴더 삭제 후 다시 시작해주세요.".red
555
- end
556
- end
557
- return 0
558
- @driver.quit
559
- end
560
-
561
- end
476
+ rescue => e
477
+ @driver.window_handles.each do |handle|
478
+ @driver.switch_to.window(handle)
479
+ begin
480
+ # 로딩 중이거나, 페이지가 완전히 로딩되지 않더라도 탭을 닫기
481
+ @driver.close
482
+ rescue Selenium::WebDriver::Error::WebDriverError => e
483
+ puts "초기 작업 브라우저가 완벽하게 세팅 되지 않았습니다.".red
484
+ puts "C드라이브에서 scraping_cookie 폴더 삭제 후 다시 시작해주세요.".red
485
+ end
486
+ end
487
+ return 0
488
+ @driver.quit
489
+ end
490
+
491
+
492
+ rescue => e
493
+ puts "초기 작업 브라우저가 완벽하게 세팅 되지 않았습니다.".red
494
+ puts "C드라이브에서 scraping_cookie 폴더 삭제 후 다시 시작해주세요.".red
495
+ @driver.window_handles.each do |handle|
496
+ @driver.switch_to.window(handle)
497
+ begin
498
+ # 로딩 중이거나, 페이지가 완전히 로딩되지 않더라도 탭을 닫기
499
+ @driver.close
500
+ rescue Selenium::WebDriver::Error::WebDriverError => e
501
+ puts "초기 작업 브라우저가 완벽하게 세팅 되지 않았습니다.".red
502
+ puts "C드라이브에서 scraping_cookie 폴더 삭제 후 다시 시작해주세요.".red
503
+ end
504
+ end
505
+ return 0
506
+ @driver.quit
507
+ end
508
+
509
+ end
562
510
 
563
- rescue => e
564
- puts "초기 작업 브라우저가 완벽하게 세팅 되지 않았습니다.".red
565
- puts "C드라이브에서 scraping_cookie 폴더 삭제 후 다시 시작해주세요.".red
566
- @driver.window_handles.each do |handle|
567
- @driver.switch_to.window(handle)
568
- begin
569
- # 로딩 중이거나, 페이지가 완전히 로딩되지 않더라도 탭을 닫기
570
- @driver.close
571
- rescue Selenium::WebDriver::Error::WebDriverError => e
572
- puts "Failed to close tab: #{e.message}"
573
- end
574
- end
575
- @driver.quit
576
- return 0
577
- end
511
+ rescue => e
512
+ puts "초기 작업 브라우저가 완벽하게 세팅 되지 않았습니다.".red
513
+ puts "C드라이브에서 scraping_cookie 폴더 삭제 후 다시 시작해주세요.".red
514
+ @driver.window_handles.each do |handle|
515
+ @driver.switch_to.window(handle)
516
+ begin
517
+ # 로딩 중이거나, 페이지가 완전히 로딩되지 않더라도 탭을 닫기
518
+ @driver.close
519
+ rescue Selenium::WebDriver::Error::WebDriverError => e
520
+ puts "Failed to close tab: #{e.message}"
521
+ end
522
+ end
523
+ @driver.quit
524
+ return 0
525
+ end
578
526
 
579
527
 
580
528
 
581
- else
582
- end
529
+ else
530
+ end
583
531
 
584
- begin
532
+ begin
585
533
 
586
534
 
587
535
 
588
- @driver.get('https://chromewebstore.google.com/detail/captcha-solver-auto-recog/ifibfemgeogfhoebkmokieepdoobkbpo?hl=ko')
589
- sleep(1)
590
- wait = Selenium::WebDriver::Wait.new(:timeout => 5)
591
- #요소가 나타날 때까지 3초 동안 기다립니다.
592
- wait.until { @driver.find_element(xpath: '//section[@class="lwrbTd"]//button[@jsname="ajZLRd"]') } #추가 되어 있음
593
- sleep(1)
594
- @driver.manage.window.maximize
536
+ @driver.get('https://chromewebstore.google.com/detail/captcha-solver-auto-recog/ifibfemgeogfhoebkmokieepdoobkbpo?hl=ko')
537
+ sleep(1)
538
+ wait = Selenium::WebDriver::Wait.new(:timeout => 5)
539
+ #요소가 나타날 때까지 3초 동안 기다립니다.
540
+ wait.until { @driver.find_element(xpath: '//section[@class="lwrbTd"]//button[@jsname="ajZLRd"]') } #추가 되어 있음
541
+ sleep(1)
542
+ @driver.manage.window.maximize
595
543
 
596
- rescue => e
597
- puts '-[√] 연결 실패.......'.red
598
- @driver.window_handles.each do |handle|
599
- @driver.switch_to.window(handle)
600
- begin
601
- # 로딩 중이거나, 페이지가 완전히 로딩되지 않더라도 탭을 닫기
602
- @driver.close
603
- rescue Selenium::WebDriver::Error::WebDriverError => e
604
- puts "Failed to close tab: #{e.message}"
605
- end
606
- end
607
- @driver.quit
608
- return 0
609
- end
544
+ rescue => e
545
+ puts '-[√] 연결 실패.......'.red
546
+ @driver.window_handles.each do |handle|
547
+ @driver.switch_to.window(handle)
548
+ begin
549
+ # 로딩 중이거나, 페이지가 완전히 로딩되지 않더라도 탭을 닫기
550
+ @driver.close
551
+ rescue Selenium::WebDriver::Error::WebDriverError => e
552
+ puts "Failed to close tab: #{e.message}"
553
+ end
554
+ end
555
+ @driver.quit
556
+ return 0
557
+ end
610
558
  end
611
559
 
612
560
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: posting_zon
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.88.799
4
+ version: 3.89.799
5
5
  platform: ruby
6
6
  authors:
7
7
  - zon
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-05-12 00:00:00.000000000 Z
10
+ date: 2025-05-13 00:00:00.000000000 Z
11
11
  dependencies: []
12
12
  description: posting app
13
13
  email: mymin26@naver.com