diff --git a/.github/workflows/event-listener.yml b/.github/workflows/event-listener.yml deleted file mode 100644 index 1134be3..0000000 --- a/.github/workflows/event-listener.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: GitBook Event Receiver - -on: - repository_dispatch: - types: [gitbook_update] - -jobs: - process-gitbook-update: - runs-on: ubuntu-latest - steps: - - name: Acknowledge Event - run: | - echo "🚀 Event Received from GitBook!" - echo "Commit: ${{ github.event.client_payload.sha }}" - echo "Author: ${{ github.event.client_payload.author }}" - echo "Summary: ${{ github.event.client_payload.message }}" - - - name: Show Changed Paths - run: | - echo "The following filtered paths were modified:" - echo "${{ github.event.client_payload.changed_paths }}" - - - name: View Detailed Diff - run: | - echo "--- START OF DIFF ---" - echo "${{ github.event.client_payload.diff }}" - echo "--- END OF DIFF ---" - - # EXAMPLE: Action based on specific path - - name: Conditional Logic - if: contains(github.event.client_payload.changed_paths, 'docs/api-reference') - run: | - echo "Detected change in API Reference. Triggering internal sync..." - # Insert your custom command here (e.g., npm run build-docs) \ No newline at end of file diff --git a/.github/workflows/oxylabs-sdk-python-karolis.code-workspace b/.github/workflows/oxylabs-sdk-python-karolis.code-workspace deleted file mode 100644 index 4c6c91a..0000000 --- a/.github/workflows/oxylabs-sdk-python-karolis.code-workspace +++ /dev/null @@ -1,13 +0,0 @@ -{ - "folders": [ - { - "name": "oxylabs-sdk-python-karolis", - "path": "../.." - }, - { - "name": "tests", - "path": "../../../oxylabs-sdk-master-repo/oxylabs-sdk-python/tests" - } - ], - "settings": {} -} \ No newline at end of file diff --git a/src/oxylabs/sources/youtube_transcript/__init__.py b/src/oxylabs/sources/youtube_transcript/__init__.py deleted file mode 100644 index 3e7162c..0000000 --- a/src/oxylabs/sources/youtube_transcript/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .youtube_transcript import YoutubeTranscript, YoutubeTranscriptAsync \ No newline at end of file diff --git a/src/oxylabs/sources/youtube_transcript/youtube_transcript.py b/src/oxylabs/sources/youtube_transcript/youtube_transcript.py deleted file mode 100644 index 610a514..0000000 --- a/src/oxylabs/sources/youtube_transcript/youtube_transcript.py +++ /dev/null @@ -1,106 +0,0 @@ -from typing import Optional - -from oxylabs.internal.api import RealtimeAPI, AsyncAPI -from oxylabs.sources.response import Response -from oxylabs.utils.types import source -from oxylabs.utils.utils import prepare_config - - -class YoutubeTranscript: - def __init__(self, api_instance:RealtimeAPI) -> None: - """ - Initializes an instance of the YoutubeTranscript class. - - Args: - api_instance: An instance of the RealtimeAPI class used for making requests. - """ - self._api_instance = api_instance - - def scrape_transcript( - self, - query: str, - context: Optional[list] = None, - callback_url: Optional[str] = None, - request_timeout: Optional[int] = 165, - **kwargs - ) -> Response: - """ - Scrapes a YouTube video transcript for a given query. - - Args: - query (str): A YouTube video ID - context: Optional[list], - callback_url (Optional[str]): URL to your callback endpoint. - request_timeout (int | 165, optional): The interval in seconds for - the request to time out if no response is returned. - Defaults to 165. - - Returns: - Response: The response from the server after the job is completed. - """ - - config = prepare_config(request_timeout=request_timeout) - payload = { - "source": source.YOUTUBE_TRANSCRIPT, - "query": query, - "context": context, - "callback_url": callback_url, - **kwargs, - } - api_response = self._api_instance.get_response(payload, config) - return Response(api_response) - -class YoutubeTranscriptAsync: - def __init__(self, api_instance:AsyncAPI) -> None: - """ - Initializes an instance of the YoutubeTranscriptAsync class. - - Args: - api_instance: An instance of the AsyncAPI class used for making requests. - """ - self._api_instance = api_instance - - async def scrape_transcript( - self, - query: str, - context: Optional[list] = None, - callback_url: Optional[str] = None, - request_timeout: Optional[int] = 165, - job_completion_timeout: Optional[int] = None, - poll_interval: Optional[int] = None, - **kwargs - ) -> Response: - """ - Asynchronously scrapes a YouTube video transcript for a given query. - - Args: - query (str): A YouTube video ID - context: Optional[list], - callback_url (Optional[str]): URL to your callback endpoint. - request_timeout (int | 165, optional): The interval in seconds for - the request to time out if no response is returned. - Defaults to 165. - poll_interval (Optional[int]): The interval in seconds to poll - the server for a response. - job_completion_timeout (Optional[int]): The interval in - seconds for the job to time out if no response is returned. - - Returns: - Response: The response from the server after the job is completed. - """ - - config = prepare_config( - request_timeout=request_timeout, - poll_interval=poll_interval, - job_completion_timeout=job_completion_timeout, - async_integration=True, - ) - payload = { - "source": source.YOUTUBE_TRANSCRIPT, - "query": query, - "context": context, - "callback_url": callback_url, - **kwargs, - } - api_response = await self._api_instance.get_response(payload, config) - return Response(api_response)