airbyte-source-google-search-console 1.5.14.dev202502181519__py3-none-any.whl → 1.5.16__py3-none-any.whl
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.
- {airbyte_source_google_search_console-1.5.14.dev202502181519.dist-info → airbyte_source_google_search_console-1.5.16.dist-info}/METADATA +4 -4
- {airbyte_source_google_search_console-1.5.14.dev202502181519.dist-info → airbyte_source_google_search_console-1.5.16.dist-info}/RECORD +6 -6
- {airbyte_source_google_search_console-1.5.14.dev202502181519.dist-info → airbyte_source_google_search_console-1.5.16.dist-info}/WHEEL +1 -1
- source_google_search_console/config_migrations.py +4 -1
- source_google_search_console/streams.py +6 -18
- {airbyte_source_google_search_console-1.5.14.dev202502181519.dist-info → airbyte_source_google_search_console-1.5.16.dist-info}/entry_points.txt +0 -0
@@ -1,19 +1,19 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: airbyte-source-google-search-console
|
3
|
-
Version: 1.5.
|
3
|
+
Version: 1.5.16
|
4
4
|
Summary: Source implementation for Google Search Console.
|
5
5
|
License: Elv2
|
6
6
|
Author: Airbyte
|
7
7
|
Author-email: contact@airbyte.io
|
8
|
-
Requires-Python: >=3.
|
8
|
+
Requires-Python: >=3.10,<3.12
|
9
9
|
Classifier: License :: Other/Proprietary License
|
10
10
|
Classifier: Programming Language :: Python :: 3
|
11
|
-
Classifier: Programming Language :: Python :: 3.9
|
12
11
|
Classifier: Programming Language :: Python :: 3.10
|
13
12
|
Classifier: Programming Language :: Python :: 3.11
|
14
|
-
Requires-Dist: airbyte-cdk (>=
|
13
|
+
Requires-Dist: airbyte-cdk (>=6,<7)
|
15
14
|
Requires-Dist: google-api-python-client (==2.105.0)
|
16
15
|
Requires-Dist: google-auth (==2.23.3)
|
16
|
+
Requires-Dist: pendulum (>=3.1.0,<4.0.0)
|
17
17
|
Project-URL: Documentation, https://docs.airbyte.com/integrations/sources/google-search-console
|
18
18
|
Project-URL: Homepage, https://airbyte.com
|
19
19
|
Project-URL: Repository, https://github.com/airbytehq/airbyte
|
@@ -1,5 +1,5 @@
|
|
1
1
|
source_google_search_console/__init__.py,sha256=HQCPu-CK7XmVDtP9rmTdB2XyraVCc6pv9pw38-O8y48,1191
|
2
|
-
source_google_search_console/config_migrations.py,sha256=
|
2
|
+
source_google_search_console/config_migrations.py,sha256=Cl4SUdJpAf6wMM_vVhqjjU89NfUq9LIGJ9zNrWiBk-A,4235
|
3
3
|
source_google_search_console/exceptions.py,sha256=iD3jYC4WxVCEKGsqQ7Vaj1tbjhJZ4S5mnSDnwFJdsIQ,1097
|
4
4
|
source_google_search_console/run.py,sha256=q6O2iXoxtrdgtodCaanqTO2eKzUvXF2iDCfmCxaPE24,462
|
5
5
|
source_google_search_console/schemas/search_analytics_all_fields.json,sha256=iQxRh_c_yz3uGofqpo1KX571TMmzYjKScb0PtI6SN_Q,1729
|
@@ -19,8 +19,8 @@ source_google_search_console/schemas/sites.json,sha256=WNiCRuStPL1YkJiFa8FEbNJmq
|
|
19
19
|
source_google_search_console/service_account_authenticator.py,sha256=gjUxt0xFxj82uviCQNTsA1Jlee__UDhYNjE7bRO1G0U,1227
|
20
20
|
source_google_search_console/source.py,sha256=8n10_agSa2rvPvEyBvOfOpmpEardbEhi3H0vlK2A4_g,10002
|
21
21
|
source_google_search_console/spec.json,sha256=WYtFvaSqWYGm1Dt2yV9G92U78Q94rh9oarbxJe3H7xo,8470
|
22
|
-
source_google_search_console/streams.py,sha256=
|
23
|
-
airbyte_source_google_search_console-1.5.
|
24
|
-
airbyte_source_google_search_console-1.5.
|
25
|
-
airbyte_source_google_search_console-1.5.
|
26
|
-
airbyte_source_google_search_console-1.5.
|
22
|
+
source_google_search_console/streams.py,sha256=WyClF4v6w5ZdYL9Ses_ITBzMNd6CQLaNKU64HtFMcfE,19920
|
23
|
+
airbyte_source_google_search_console-1.5.16.dist-info/METADATA,sha256=EP6HmlXTCdUKVQ60kcMeYiNuouMzeWbfnslQqyAqqlc,5622
|
24
|
+
airbyte_source_google_search_console-1.5.16.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
25
|
+
airbyte_source_google_search_console-1.5.16.dist-info/entry_points.txt,sha256=DMcgc9bCX-Vt6hm_68pa77qS3eGdeMhg-UdlFc-XKUM,85
|
26
|
+
airbyte_source_google_search_console-1.5.16.dist-info/RECORD,,
|
@@ -6,8 +6,11 @@
|
|
6
6
|
import logging
|
7
7
|
from typing import Any, List, Mapping
|
8
8
|
|
9
|
+
import orjson
|
10
|
+
|
9
11
|
from airbyte_cdk.config_observation import create_connector_config_control_message
|
10
12
|
from airbyte_cdk.entrypoint import AirbyteEntrypoint
|
13
|
+
from airbyte_cdk.models import AirbyteMessageSerializer
|
11
14
|
from airbyte_cdk.sources import Source
|
12
15
|
from airbyte_cdk.sources.message import InMemoryMessageRepository, MessageRepository
|
13
16
|
|
@@ -77,7 +80,7 @@ class MigrateCustomReports:
|
|
77
80
|
cls.message_repository.emit_message(create_connector_config_control_message(migrated_config))
|
78
81
|
# emit the Airbyte Control Message from message queue to stdout
|
79
82
|
for message in cls.message_repository._message_queue:
|
80
|
-
print(message.
|
83
|
+
print(orjson.dumps(AirbyteMessageSerializer.dump(message)).decode())
|
81
84
|
|
82
85
|
@classmethod
|
83
86
|
def migrate(cls, args: List[str], source: Source) -> None:
|
@@ -81,7 +81,7 @@ class GoogleSearchConsole(HttpStream, ABC):
|
|
81
81
|
self.logger.error(f"Stream `{self.name}`. {error.get('message')}. Trying with `aggregationType = auto` instead.")
|
82
82
|
self.aggregation_type = QueryAggregationType.auto
|
83
83
|
setattr(self, "raise_on_http_errors", False)
|
84
|
-
return
|
84
|
+
return response.status_code == 429 or 500 <= response.status_code < 600
|
85
85
|
|
86
86
|
|
87
87
|
class Sites(GoogleSearchConsole):
|
@@ -90,6 +90,7 @@ class Sites(GoogleSearchConsole):
|
|
90
90
|
"""
|
91
91
|
|
92
92
|
primary_key = None
|
93
|
+
is_resumable = False
|
93
94
|
|
94
95
|
def path(
|
95
96
|
self,
|
@@ -107,6 +108,7 @@ class Sitemaps(GoogleSearchConsole):
|
|
107
108
|
|
108
109
|
primary_key = None
|
109
110
|
data_field = "sitemap"
|
111
|
+
is_resumable = False
|
110
112
|
|
111
113
|
def path(
|
112
114
|
self,
|
@@ -371,19 +373,7 @@ class SearchAppearance(SearchAnalytics):
|
|
371
373
|
primary_key = None
|
372
374
|
dimensions = ["searchAppearance"]
|
373
375
|
|
374
|
-
|
375
|
-
self,
|
376
|
-
stream_state: Mapping[str, Any] = None,
|
377
|
-
stream_slice: Mapping[str, Any] = None,
|
378
|
-
next_page_token: Mapping[str, Any] = None,
|
379
|
-
) -> Optional[Union[Dict[str, Any], str]]:
|
380
|
-
data = super().request_body_json(stream_state, stream_slice, next_page_token)
|
381
|
-
|
382
|
-
fields_to_remove = ["aggregationType", "startRow", "rowLimit", "dataState"]
|
383
|
-
for field in fields_to_remove:
|
384
|
-
data.pop(field, None)
|
385
|
-
|
386
|
-
return data
|
376
|
+
|
387
377
|
class SearchByKeyword(SearchAnalytics):
|
388
378
|
"""
|
389
379
|
Adds searchAppearance value to dimensionFilterGroups in json body
|
@@ -392,14 +382,13 @@ class SearchByKeyword(SearchAnalytics):
|
|
392
382
|
groupType: "and" - Whether all filters in this group must return true ("and"), or one or more must return true (not yet supported).
|
393
383
|
filters: {"dimension": "searchAppearance", "operator": "equals", "expression": keyword}
|
394
384
|
"""
|
395
|
-
search_types = ["web", "news", "image", "video", "discover", "googleNews"]
|
396
385
|
|
397
386
|
def stream_slices(
|
398
387
|
self, sync_mode: SyncMode, cursor_field: List[str] = None, stream_state: Mapping[str, Any] = None
|
399
388
|
) -> Iterable[Optional[Mapping[str, Any]]]:
|
400
|
-
search_appearance_stream = SearchAppearance(self._session.auth, self._site_urls, self._start_date, self._end_date)
|
389
|
+
search_appearance_stream = SearchAppearance(self._http_client._session.auth, self._site_urls, self._start_date, self._end_date)
|
401
390
|
|
402
|
-
for stream_slice in super().stream_slices(sync_mode, cursor_field, stream_state):
|
391
|
+
for stream_slice in super().stream_slices(sync_mode, cursor_field, stream_state):
|
403
392
|
keywords_records = search_appearance_stream.read_records(
|
404
393
|
sync_mode=SyncMode.full_refresh, stream_state=stream_state, stream_slice=stream_slice
|
405
394
|
)
|
@@ -408,7 +397,6 @@ class SearchByKeyword(SearchAnalytics):
|
|
408
397
|
for keyword in keywords:
|
409
398
|
filters = {"dimension": "searchAppearance", "operator": "equals", "expression": keyword}
|
410
399
|
stream_slice["dimensionFilterGroups"] = [{"groupType": "and", "filters": filters}]
|
411
|
-
stream_slice["dimensions"] = self.dimensions
|
412
400
|
|
413
401
|
yield stream_slice
|
414
402
|
|