Export Gramps to Myheritage with married surname

Another one thing. Almost all my media have attributes like “URL”, “Familysearch URL”.

Myheritage doesnt receive them via GEDCOM. But it has “URL” field for sources (citations in Gramps). If anybody needs move media urls into a proper field of myheritage, you can make these changes here /usr/local/lib/python3.10/dist-packages/gramps/plugins/export/exportgedcom.py (row 1461):

instead of this:

-        # Reference to the source
-        self._writeln(level, "SOUR", "@%s@" % src.get_gramps_id())
-        if citation.get_page() != "":
-            # PAGE <WHERE_WITHIN_SOURCE> can not have CONC lines.
-            # WHERE_WITHIN_SOURCE:= {Size=1:248}
-            # Maximize line to 248 and set limit to 248, for no line split
-            self._writeln(level + 1, "PAGE", citation.get_page()[0:248], limit=248)

use something like this (but correct for four needs):

+        page_str = ""    
+        found = False
+        media_list = citation.get_media_list()
+        for media in media_list:
+            media_handle = media.get_reference_handle()
+            if media_handle and isinstance(media_handle, str):
+                media = self.dbase.get_media_from_handle(media_handle)
+                if media:
+                    for attr in media.get_attribute_list():
+                        if "url" in str(attr.get_type()).lower():
+                            page_str = attr.get_value()
+                            found = True
+                            break
+            if found:
+                break
+                if page_str == "":
+                    page_str = citation.get_page()+

+        # Reference to the source
+        self._writeln(level, "SOUR", "@%s@" % src.get_gramps_id())
+        if page_str != "":
+            # PAGE <WHERE_WITHIN_SOURCE> can not have CONC lines.
+            # WHERE_WITHIN_SOURCE:= {Size=1:248}
+            # Maximize line to 248 and set limit to 248, for no line split
+            # But Myheritage supports up to 255 characters
+            self._writeln(level + 1, "PAGE", page_str[0:255], limit=255)