Skip to content

Commit

Permalink
Update version v1.6 and xpaths
Browse files Browse the repository at this point in the history
  • Loading branch information
biplobsd committed Nov 3, 2023
1 parent 7bfc0a8 commit 9ce9f31
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 11 deletions.
8 changes: 3 additions & 5 deletions data/xpath.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@
"IS_EXPENDEDABLE_EXPENDED_BUTTON": "//*[contains(normalize-space(), 'Subscriptions')]/following-sibling::div[@id='items']/ytd-guide-collapsible-entry-renderer/ytd-guide-entry-renderer",
"THREE_LINES": "//yt-icon-button[@id='guide-button']",
"DRAWER_OPENED": "//div[@id='contentContainer' and @opened]",
"ALREADY_SUBSCRIBE": "//span[translate(.,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')='{{channelID}}']/ancestor::div[@id='info-section']//div[@id='notification-preference-button' and not(@invisible)]//span[text()='Subscribed']",
"SUBSCRIBE_BTN": "//span[translate(.,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')='{{channelID}}']/ancestor::div[@id='info-section']//div[@id='subscribe-button']//span[text()='Subscribe']/ancestor::button",
"ALREADY_SUBSCRIBE": "//div[@id='inner-header-container']//div[@id='notification-preference-button' and not(@invisible)]//span[text()='Subscribed']",
"SUBSCRIBE_BTN": "//div[@id='inner-header-container']/div/div[@id='subscribe-button']//yt-button-shape[not(@hidden) and @id='subscribe-button-shape']/button",
"UNSUB1": "//yt-formatted-string[text()='Unsubscribe']",
"UNSUB2": "//button[@aria-label='Unsubscribe']",
"SEARCH_INPUT": "//input[@id='search']",
"NAVIGATION_PROGRESS": "//yt-page-navigation-progress[not(@hidden)]"
"UNSUB2": "//button[@aria-label='Unsubscribe']"
}
17 changes: 17 additions & 0 deletions data/xpaths/v1.6.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"SUBSCRIPTIONS_SECTION": "//*[contains(normalize-space(), 'Subscriptions')]/following-sibling::div[@id='items']",
"GET_CHANNELS_WITHOUT_EXPEND": "//*[contains(normalize-space(), 'Subscriptions')]/following-sibling::div[@id='items']/ytd-guide-entry-renderer/a[@href]",
"SUB_CHANNELS_EXPENDED_ITEMS": "//*[contains(normalize-space(), 'Subscriptions')]/following-sibling::div[@id='items']/ytd-guide-collapsible-entry-renderer/div/div/ytd-guide-entry-renderer",
"GET_CHANNELS_IN_EXPEND": "//*[contains(normalize-space(), 'Subscriptions')]/following-sibling::div[@id='items']/ytd-guide-collapsible-entry-renderer/div/div/ytd-guide-entry-renderer/a[@href]",
"IS_EXPENDEDABLE": "//*[contains(normalize-space(), 'Subscriptions')]/following-sibling::div[@id='items']/ytd-guide-collapsible-entry-renderer",
"IS_EXPENDEDABLE_EXPENDED": "//*[contains(normalize-space(), 'Subscriptions')]/following-sibling::div[@id='items']/ytd-guide-collapsible-entry-renderer[@expanded]",
"IS_EXPENDEDABLE_EXPENDED_BUTTON": "//*[contains(normalize-space(), 'Subscriptions')]/following-sibling::div[@id='items']/ytd-guide-collapsible-entry-renderer/ytd-guide-entry-renderer",
"THREE_LINES": "//yt-icon-button[@id='guide-button']",
"DRAWER_OPENED": "//div[@id='contentContainer' and @opened]",
"ALREADY_SUBSCRIBE": "//span[translate(.,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')='{{channelID}}']/ancestor::div[@id='info-section']//div[@id='notification-preference-button' and not(@invisible)]//span[text()='Subscribed']",
"SUBSCRIBE_BTN": "//span[translate(.,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')='{{channelID}}']/ancestor::div[@id='info-section']//div[@id='subscribe-button']//span[text()='Subscribe']/ancestor::button",
"UNSUB1": "//yt-formatted-string[text()='Unsubscribe']",
"UNSUB2": "//button[@aria-label='Unsubscribe']",
"SEARCH_INPUT": "//input[@id='search']",
"NAVIGATION_PROGRESS": "//yt-page-navigation-progress[not(@hidden)]"
}
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Youtube Subscriptions Transfer",
"description": "Transferring subscriptions from one YouTube account to another",
"version": "1.5",
"version": "1.6",
"manifest_version": 3,
"icons": {
"16": "src/assets/icons/icon16.png",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "youtube-subscriptions-transfer",
"version": "1.5",
"version": "1.6",
"type": "module",
"repository": {
"type": "git",
Expand Down
5 changes: 2 additions & 3 deletions src/utils/constants.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
export const STORIES_URL = ["https://www.youtube.com/"];
export const DEFAULT_STATUS_MSG = "Ready for request";
export const APP_NAME = "Youtube Subscriptions Transfer";
export const VERSION = "v1.5";
export const VERSION = "v1.6";

export const REPO_URL = "https://github.com/biplobsd/yst";
export const XPATH_URL =
"https://raw.githubusercontent.com/biplobsd/yst/main/data/xpath.json";
export const XPATH_URL = `https://raw.githubusercontent.com/biplobsd/yst/main/data/xpaths/${VERSION}.json`;

export const CHANNEL_PATHS_KEY = "channelPaths";
export const XPATH_VALUES_KEY = "xpathValues";
Expand Down
2 changes: 1 addition & 1 deletion src/utils/xpaths.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import xpathJson from "../../data/xpath.json";
import xpathJson from "../../data/xpaths/v1.6.json";
import { z } from "zod";

export const XPathModelSchema = z.object({
Expand Down

0 comments on commit 9ce9f31

Please sign in to comment.