-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix MyHeritage with new design #115
base: master
Are you sure you want to change the base?
Conversation
Update from master
Merge from master
If it helps, here was my work in progress that I haven't had time to finish. |
@eljeffeg e.g. for https://www.myheritage.com/profile-420551751-1500056/dov-kushnir:
Unfortunately, the GraphQL request is sent with a |
Ideally speaking - we need to tap on these responses and everything you need is there but I'm not sure how to fetch this data from JQuery/HTML |
I found this code:
It seems that they generate the link on the |
I fixed various things - |
OK @eljeffeg , I think we're in a whole new realm here. As you can see The question now is... it seems that we can't just fetch this from the HTML itself (as the logic happens today) - and some React analysis is required. Here's what Google Gemini said:
|
Yeah, I see what you mean with https://familygraphql.myheritage.com. That's suppose to be MyHeritage's API - wonder if it's still an accessible option. For the react, a content script probably wouldn't work for this part of SmartCopy, but a background script might. We do have a background script that runs from the popup in |
What you have is a lot better than the failure now, so I wonder if we should just commit that and let everyone know we're still working out the dates. We might be able to at least put the years in there, since that appears to be in the data. |
@eljeffeg - the problem is not the dates rather than the urls. Without it, SmartCopy (atleast today's implementation) doesn't "recognize" the family members - which is, I think, a crucial part. I'd definitely leave the dates out, but in my opinion, the URLs are a must.... |
In a perfect world, I'd somehow reuse the bearer token and call the GraphQL myself (rather than parsing the HTML) and fetch all the data from there. However, couple of thoughts on this:
On the other hand, I have no clear idea about accessing React Component's state from within an Extension. |
Commenting without too much knowledge ... this is about translating the list of family members into queries that fetch the information about the family members? Is the URL you need the one for the family member's page? Wild thought - is it possible to just follow the relative links from within the page and intercept the queries so that you can figure out what the complete URL has become? (the interception could also return a 5xx code to avoid bumping the rate limiter)? Or is the result of following the relative link a different URL from the one you need? |
The problem here is how to get the links - the way this is implemented is through React Components, when the page is built - each family member in the list has a The trouble here is how to get these links... React BS... |
@eljeffeg as a temp solution. We can set the url as the current page url for all family members, so they'll be added but referenced to the source person and not the actual person. WDYT? |
If we can add "referenced in " to the text of the URL in family members, that would make it clear what's happening. |
any chance of getting this merged? I'm still hurting from the lack of MyHeritage SmartCopy. |
Still hoping to get it working with actual URLs. |
As we update the parsers for particular sites, we may want to consider implementing a model based on beautifulsoup. https://beautiful-soup-4.readthedocs.io/en/latest/ |
@eljeffeg any references in the project? Isn't beautiful soup is a python tool? |
Ha, you're right. I work with Python so much I forgot that this project is pretty much just JS. |
OK. I give up. I'll set the |
Is this ready to merge, then? |
@alvestrand - this won't do, I'm afraid. |
|
I see that when loading - the page does a GraphQL Query: This is for Request to **https://familygraphql.myheritage.com/profile_header_data**Request
ResponseResponse
Request to **https://familygraphql.myheritage.com/profile_details_data**Request
ResponseResponse
This could be a potential to use it - but we need to extract the BearerToken from the page somehow |
Yeah, if you can use the background script, it's not too hard to call listener functions in that and wait for the response. |
I'd love to see an example |
Still work in progress.... DO NOT MERGE YET
Solves #110