zon_cafe_comment 0.0.39 → 0.0.50
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.
- checksums.yaml +4 -4
- data/lib/zon_cafe_comment.rb +59 -32
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 03724477226e73369888acb6e246abfabbdfe52a51c2b64142243ff861362579
|
4
|
+
data.tar.gz: 2989ac71fe792346219601f34194391d82481ad447a3414e66aefea25b2ff677
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa4c2e866630e01f7a440751449379019a67e52a1a084e58150376d8c8840ba4faa781d86750bd4daf00b9dd652fa5b83a225a53794f72e119fdcf050b166e39
|
7
|
+
data.tar.gz: f6f147fc2ec2bcb9f5e98d884e331b8a6f202b9065573ea7aac91f558b27a196d7403e07ff2aac64b356ab81fadb884ca6853a8667c05abdef5809f66be64c4d
|
data/lib/zon_cafe_comment.rb
CHANGED
@@ -493,19 +493,22 @@ class Naver
|
|
493
493
|
sleep(1)
|
494
494
|
@driver.switch_to.frame(@driver.find_element(:xpath, '//*[@id="cafe_main"]')) # 아이프레임 선택
|
495
495
|
|
496
|
-
@
|
496
|
+
if @data['포스트설정']['순서사용2'].checked?
|
497
|
+
@content_soon ||= 0 # 초기 한 번만 0으로 세팅
|
497
498
|
|
498
|
-
|
499
|
-
|
500
|
-
else
|
501
|
-
if @data.dig('내용설정', '랜덤사용')&.respond_to?(:checked?) && @data['내용설정']['랜덤사용'].checked?
|
502
|
-
content = @data['내용설정']['내용'].sample[2]
|
499
|
+
if @data['내용설정']['내용'].nil? || @data['내용설정']['내용'].empty?
|
500
|
+
content = ''
|
503
501
|
else
|
504
|
-
|
505
|
-
|
506
|
-
|
502
|
+
if @data.dig('내용설정', '랜덤사용')&.respond_to?(:checked?) && @data['내용설정']['랜덤사용'].checked?
|
503
|
+
content = @data['내용설정']['내용'].sample[2]
|
504
|
+
else
|
505
|
+
content = @data['내용설정']['내용'][@content_soon][2]
|
506
|
+
@content_soon += 1
|
507
|
+
@content_soon = 0 if @content_soon >= @data['내용설정']['내용'].length
|
508
|
+
end
|
507
509
|
end
|
508
|
-
|
510
|
+
else
|
511
|
+
end
|
509
512
|
|
510
513
|
# 디엠 자동 변경이 체크된 경우 content를 변환
|
511
514
|
if @data['포스트설정']['내용자동변경'].checked?
|
@@ -753,19 +756,22 @@ class Naver
|
|
753
756
|
sleep(1)
|
754
757
|
@driver.switch_to.frame(@driver.find_element(:xpath, '//*[@id="cafe_main"]')) # 아이프레임 선택
|
755
758
|
|
756
|
-
@
|
759
|
+
if @data['포스트설정']['순서사용2'].checked?
|
760
|
+
@content_soon ||= 0 # 초기 한 번만 0으로 세팅
|
757
761
|
|
758
|
-
|
759
|
-
|
760
|
-
else
|
761
|
-
if @data.dig('내용설정', '랜덤사용')&.respond_to?(:checked?) && @data['내용설정']['랜덤사용'].checked?
|
762
|
-
content = @data['내용설정']['내용'].sample[2]
|
762
|
+
if @data['내용설정']['내용'].nil? || @data['내용설정']['내용'].empty?
|
763
|
+
content = ''
|
763
764
|
else
|
764
|
-
|
765
|
-
|
766
|
-
|
765
|
+
if @data.dig('내용설정', '랜덤사용')&.respond_to?(:checked?) && @data['내용설정']['랜덤사용'].checked?
|
766
|
+
content = @data['내용설정']['내용'].sample[2]
|
767
|
+
else
|
768
|
+
content = @data['내용설정']['내용'][@content_soon][2]
|
769
|
+
@content_soon += 1
|
770
|
+
@content_soon = 0 if @content_soon >= @data['내용설정']['내용'].length
|
771
|
+
end
|
767
772
|
end
|
768
|
-
|
773
|
+
else
|
774
|
+
end
|
769
775
|
|
770
776
|
# 디엠 자동 변경이 체크된 경우 content를 변환
|
771
777
|
if @data['포스트설정']['내용자동변경'].checked?
|
@@ -1099,19 +1105,22 @@ class Naver
|
|
1099
1105
|
sleep(1)
|
1100
1106
|
@driver.switch_to.frame(@driver.find_element(:xpath, '//*[@id="cafe_main"]')) # 아이프레임 선택
|
1101
1107
|
|
1102
|
-
@
|
1108
|
+
if @data['포스트설정']['순서사용2'].checked?
|
1109
|
+
@content_soon ||= 0 # 초기 한 번만 0으로 세팅
|
1103
1110
|
|
1104
|
-
|
1105
|
-
|
1106
|
-
else
|
1107
|
-
if @data.dig('내용설정', '랜덤사용')&.respond_to?(:checked?) && @data['내용설정']['랜덤사용'].checked?
|
1108
|
-
content = @data['내용설정']['내용'].sample[2]
|
1111
|
+
if @data['내용설정']['내용'].nil? || @data['내용설정']['내용'].empty?
|
1112
|
+
content = ''
|
1109
1113
|
else
|
1110
|
-
|
1111
|
-
|
1112
|
-
|
1114
|
+
if @data.dig('내용설정', '랜덤사용')&.respond_to?(:checked?) && @data['내용설정']['랜덤사용'].checked?
|
1115
|
+
content = @data['내용설정']['내용'].sample[2]
|
1116
|
+
else
|
1117
|
+
content = @data['내용설정']['내용'][@content_soon][2]
|
1118
|
+
@content_soon += 1
|
1119
|
+
@content_soon = 0 if @content_soon >= @data['내용설정']['내용'].length
|
1120
|
+
end
|
1113
1121
|
end
|
1114
|
-
|
1122
|
+
else
|
1123
|
+
end
|
1115
1124
|
|
1116
1125
|
# 디엠 자동 변경이 체크된 경우 content를 변환
|
1117
1126
|
if @data['포스트설정']['내용자동변경'].checked?
|
@@ -1637,7 +1646,14 @@ end
|
|
1637
1646
|
@data['table'] << []
|
1638
1647
|
@data['table'].pop
|
1639
1648
|
|
1640
|
-
|
1649
|
+
if @data['포스트설정']['순서사용2'].checked?
|
1650
|
+
option['순서사용2'] = 'true'
|
1651
|
+
else
|
1652
|
+
option['순서사용2'] = 'false'
|
1653
|
+
end
|
1654
|
+
@data['table'][index][-1] = 35
|
1655
|
+
@data['table'] << []
|
1656
|
+
@data['table'].pop
|
1641
1657
|
|
1642
1658
|
#네이버로그인
|
1643
1659
|
login_check = naver.login(user_id, user_pw, option['proxy'])
|
@@ -2820,11 +2836,21 @@ end
|
|
2820
2836
|
|
2821
2837
|
horizontal_box{
|
2822
2838
|
stretchy false
|
2823
|
-
@data['내용설정']['순서사용'] = checkbox('순서사용'){
|
2839
|
+
@data['내용설정']['순서사용'] = checkbox('계정마다 순서사용'){
|
2840
|
+
stretchy false
|
2841
|
+
on_toggled{ |c|
|
2842
|
+
if c.checked?
|
2843
|
+
@data['내용설정']['랜덤사용'].checked = false
|
2844
|
+
@data['포스트설정']['순서사용2'].checked = false
|
2845
|
+
end
|
2846
|
+
}
|
2847
|
+
}
|
2848
|
+
@data['포스트설정']['순서사용2'] = checkbox('게시글마다 순서사용'){
|
2824
2849
|
stretchy false
|
2825
2850
|
on_toggled{ |c|
|
2826
2851
|
if c.checked?
|
2827
2852
|
@data['내용설정']['랜덤사용'].checked = false
|
2853
|
+
@data['내용설정']['순서사용'].checked = false
|
2828
2854
|
end
|
2829
2855
|
}
|
2830
2856
|
}
|
@@ -2833,6 +2859,7 @@ end
|
|
2833
2859
|
on_toggled{ |c|
|
2834
2860
|
if c.checked?
|
2835
2861
|
@data['내용설정']['순서사용'].checked = false
|
2862
|
+
@data['포스트설정']['순서사용2'].checked = false
|
2836
2863
|
end
|
2837
2864
|
}
|
2838
2865
|
}
|