cafe_buy_duo 0.0.20 → 0.0.23

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/cafe_buy_duo.rb +71 -62
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 87786f441a7044cb3be9e2eaadef4cb4762ff6947d00f0eff69dfd3443579dbe
4
- data.tar.gz: 5c96007b5042b03417c11f727ff94affe5427c42b54ceb66741ef9e8588b635f
3
+ metadata.gz: a7639af0261a14854ff48b5b7cd5ae08dd5bb2c5d1b836de091d0e2c0eeb08d9
4
+ data.tar.gz: 435bbf352065f577bb4507991c6a3ccf76a023cfd62dcfa329f020debdbb7a66
5
5
  SHA512:
6
- metadata.gz: 9cd86369bea1d10f0f2c00e882ddee9d9f16b2fe750cf71fcdc5bbbb0379bb0e8322dbef05de3976391ba2b07ddf74b7efec1f04b735fab969679e029aa2089e
7
- data.tar.gz: 4bba76633573e654cc2463eaba7be9612ee98c1618b6328732293a22582b969a1181b3427a320d18a52eb68603a6e500383a8486141118a4dd58bdc97cb7cfbf
6
+ metadata.gz: 4e9bc99605e2b33bb98ff072055dd5ea6b547662bc42fdcfdfc029b8c5e7b9bf60db1c69d4958fb86aff0da980336ef5867e4080b334631f2e095327c056c6c7
7
+ data.tar.gz: 0d6ee0c53ec2801df192486244b3775b2f8594397dc5ffdf76bd2758f36e4c027f2a549d442c5470aa77c36d480c9f66008f4ba4101e6f280d93cb37e06abed4
data/lib/cafe_buy_duo.rb CHANGED
@@ -1564,11 +1564,11 @@ end
1564
1564
  end
1565
1565
  end
1566
1566
  end
1567
- sleep(1)
1567
+ sleep(0.5)
1568
1568
  @driver.action.key_down(:end).key_up(:end).perform
1569
- sleep(1)
1569
+ sleep(0.5)
1570
1570
  @driver.action.key_down(:enter).key_up(:enter).perform
1571
- sleep(1)
1571
+ sleep(0.5)
1572
1572
  # if check_image == 0
1573
1573
  # if value_data['nodes'].length == 0
1574
1574
  # value_data['nodes'][0] = {
@@ -1666,92 +1666,98 @@ end
1666
1666
  tags2.split(',').each do |tag_value|
1667
1667
  tag_mm2 << ''+tag_value
1668
1668
  end
1669
- @driver.find_element(:xpath, '//*[@id="app"]/div/div/section/div/div[2]/div[1]/div[4]/div/div/input').send_keys(tag_mm2.join("\n")+"\n")
1669
+ @driver.find_element(:xpath, '//*[@placeholder="태그를 입력해주세요 (최대 10개)"]').send_keys(tag_mm2.join("\n")+"\n")
1670
1670
 
1671
1671
  sleep(1)
1672
- # data['populationParams'] = '{"configuration":{"openType":'+option['공개']+',"commentYn":'+option['댓글허용']+',"searchYn":'+option['검색허용']+',"sympathyYn":'+option['공감허용']+',"scrapType":'+option['블로그공유']+',"outSideAllowYn":'+option['외부공유허용']+',"twitterPostingYn":false,"facebookPostingYn":false,"cclYn":false},"populationMeta":{"categoryId":'+category_value+',"logNo":null,"directorySeq":0,"directoryDetail":null,"mrBlogTalkCode":null,"postWriteTimeType":"now","tags":"'+tags2+'","moviePanelParticipation":false,"greenReviewBannerYn":false,"continueSaved":false,"noticePostYn":false,"autoByCategoryYn":false,"postLocationSupportYn":false,"postLocationJson":null,"prePostDate":null,"thisDayPostInfo":null,"scrapYn":false,"autoSaveNo":'+(Time.now.to_f.round(3)*1000).to_i.to_s+'},"editorSource":"AbZmtbYiAmhrzPJyhPXNWg=="}'
1673
- # if option['공개'] == '2'
1674
- # @driver.find_element(:xpath ,'//*[@id="root"]/div/div[1]/div/div[3]/div[3]/div/div/div/div[3]/div/div/ul/li[1]/span/label').click
1675
- # elsif option['공개'] == '3'
1676
- # @driver.find_element(:xpath, '//*[@id="root"]/div/div[1]/div/div[3]/div[3]/div/div/div/div[3]/div/div/ul/li[3]/span/label').click
1677
- # elsif option['공개'] == '0'
1678
- # @driver.find_element(:xpath, '//*[@id="root"]/div/div[1]/div/div[3]/div[3]/div/div/div/div[3]/div/div/ul/li[4]/span/label').click
1679
- # else
1680
- # @driver.find_element(:xpath, '//*[@id="root"]/div/div[1]/div/div[3]/div[3]/div/div/div/div[3]/div/div/ul/li[2]/span/label').click
1681
- # end
1672
+
1673
+ if option['전체공개'] == 'true'
1674
+ puts '전체공개'
1675
+ begin
1676
+ @driver.find_element(:xpath, '//*[@class="btn_open_set"]').click
1677
+ sleep(2)
1678
+ @driver.find_element(:xpath, '//*[@for="all"]').click
1679
+ rescue
1680
+ end
1681
+ sleep(1)
1682
+ end
1683
+
1684
+ if option['멤버공개'] == 'true'
1685
+ puts '멤버공개'
1686
+ begin
1687
+ @driver.find_element(:xpath, '//*[@class="btn_open_set"]').click
1688
+ sleep(2)
1689
+ @driver.find_element(:xpath, '//*[@for="member"]').click
1690
+ rescue
1691
+ end
1692
+ sleep(1)
1693
+ end
1694
+
1682
1695
  if option['댓글허용'] == 'true'
1683
1696
  puts '댓글허용'
1684
- begin
1685
- @driver.find_element(:xpath, '/html/body/div[1]/div/div/section/div/div[2]/div[2]/div[3]/ul/li[1]/div/label').click
1686
- sleep(1)
1687
-
1688
- rescue
1689
-
1697
+ begin
1698
+ @driver.find_element(:xpath, '//*[@for="coment"]').click
1699
+ rescue
1700
+ end
1701
+ sleep(1)
1690
1702
  end
1691
- end
1692
1703
 
1693
-
1704
+
1694
1705
  if option['블로그,카페 공유허용'] == 'true'
1695
1706
  puts '블로그,카페 공유허용'
1696
1707
  begin
1697
- @driver.find_element(:xpath, '/html/body/div[1]/div/div/section/div/div[2]/div[2]/div[3]/ul/li[2]/div[1]/label').click
1698
- sleep(1)
1699
- rescue
1700
-
1708
+ @driver.find_element(:xpath, '//*[@for="blog_sharing"]').click
1709
+ rescue
1710
+ end
1711
+ sleep(1)
1701
1712
  end
1702
- end
1703
1713
 
1704
1714
 
1705
-
1715
+
1706
1716
  if option['외부공유허용'] == 'true'
1707
1717
  puts '외부공유허용'
1708
1718
  begin
1709
- @driver.find_element(:xpath, '/html/body/div[1]/div/div/section/div/div[2]/div[2]/div[3]/ul/li[3]/div[1]/label').click
1710
- sleep(1)
1711
- rescue
1712
-
1719
+ @driver.find_element(:xpath, '//*[@for="external_sharing"]').click
1720
+ rescue
1721
+ end
1722
+ sleep(1)
1713
1723
  end
1714
- end
1715
1724
 
1716
- sleep(1)
1725
+
1717
1726
 
1718
1727
  if option['복사,저장 허용'] == 'true'
1719
1728
  puts '복사,저장 허용'
1720
1729
  begin
1721
- @driver.find_element(:xpath, '/html/body/div[1]/div/div/section/div/div[2]/div[2]/div[3]/ul/li[4]/div[1]/label').click
1730
+ @driver.find_element(:xpath, '//*[@for="copy"]').click
1731
+ rescue
1732
+ end
1722
1733
  sleep(1)
1723
- rescue
1724
-
1725
1734
  end
1726
- end
1727
1735
 
1728
-
1736
+
1729
1737
  if option['자동출처 사용'] == 'true'
1730
- puts '자동출처 사용'
1731
- begin
1732
- @driver.find_element(:xpath, '/html/body/div[1]/div/div/section/div/div[2]/div[2]/div[3]/ul/li[5]/div[1]/label').click
1733
- sleep(1)
1734
- rescue
1735
-
1736
- end
1737
- end
1738
+ puts '자동출처 사용'
1739
+ begin
1740
+ @driver.find_element(:xpath, '//*[@for="automatic_source"]').click
1741
+ rescue
1742
+ end
1743
+ sleep(1)
1744
+ end
1738
1745
 
1739
-
1746
+
1740
1747
 
1741
1748
  if option['CCL 사용'] == 'true'
1742
1749
  puts 'CCL 사용'
1743
1750
  begin
1744
- @driver.find_element(:xpath, '/html/body/div[1]/div/div/section/div/div[2]/div[2]/div[3]/ul/li[6]/div[1]/label').click
1751
+ @driver.find_element(:xpath, '//*[@for="ccl"]').click
1752
+ rescue
1753
+ end
1745
1754
  sleep(1)
1746
- rescue
1747
-
1748
1755
  end
1749
- end
1750
-
1756
+
1751
1757
  # puts data['documentModel'] = data['documentModel'].to_json
1752
- sleep(2)
1758
+
1753
1759
  sleep(dd_time.to_i)
1754
- @driver.find_element(:xpath, '/html/body/div[1]/div/div/section/div/div[1]/div/a').click
1760
+ @driver.find_element(:xpath, '//*[@class="BaseButton BaseButton--skinGreen size_default"]').click
1755
1761
 
1756
1762
  sleep(7)
1757
1763
 
@@ -3212,14 +3218,17 @@ class Wordpress
3212
3218
  option['배달'] = [@data['포스트설정']['직거래'].checked?, @data['포스트설정']['택배 거래'].checked?, @data['포스트설정']['온라인전송'].checked?]
3213
3219
  option['직 거래 카테고리'] = product_category1
3214
3220
  option['결제'] = payment
3221
+
3215
3222
  if @data['포스트설정']['전체공개'].checked?
3216
- option['공개'] = '2'
3217
- # elsif @data['포스트설정']['서로이웃공개'].checked?
3218
- # option['공개'] = '3'
3219
- # elsif @data['포스트설정']['비공개'].checked?
3220
- # option['공개'] = '0'
3223
+ option['전체공개'] = 'true'
3224
+ else
3225
+ option['전체공개'] = 'false'
3226
+ end
3227
+
3228
+ if @data['포스트설정']['멤버공개'].checked?
3229
+ option['멤버공개'] = 'true'
3221
3230
  else
3222
- option['공개'] = '1'
3231
+ option['멤버공개'] = 'false'
3223
3232
  end
3224
3233
 
3225
3234
  if @data['포스트설정']['댓글허용'].checked?
@@ -5168,7 +5177,7 @@ class Wordpress
5168
5177
  end
5169
5178
  }
5170
5179
  }
5171
- @data['포스트설정']['멤버공개'] = checkbox('맴버공개'){
5180
+ @data['포스트설정']['멤버공개'] = checkbox('멤버공개'){
5172
5181
  top 10
5173
5182
  left 1
5174
5183
  on_toggled{
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cafe_buy_duo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.20
4
+ version: 0.0.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - zon