Skip to content

Instantly share code, notes, and snippets.

@jcarroll
Last active January 27, 2024 16:08
Show Gist options
  • Save jcarroll/4457ae0793b04ace1ed2957530d127a6 to your computer and use it in GitHub Desktop.
Save jcarroll/4457ae0793b04ace1ed2957530d127a6 to your computer and use it in GitHub Desktop.
List all contributors to FamilySearch profile

I have proven feasibility with BrowserFlow; however, I am limited to 1 minute runtime, and it doesn't finish.

Ideas:

A. Incremental script with BrowserFlow
    * Store results to spreadsheet
    * Skip list items that we've already seen
    * First get all names, get email addresses later
B. Create javaScript to run in console of browser (similar to Unfollow all pages script)
    Pseudocode:
    50  WHILE no more table rows:
        100 get table row
        200 click on contributor name button
        300 Wait for contributor name element to appear
        400 Add contributor name to list
        500 IF email address exists
            600 THEN add email address to list
            700 ELSE add "none" to list
    800 Scroll to bottom
    * Q: How to process all rows of table when only some appear based on scroll position?
    * Search "how to wait for element to load javascript"
    * Print output to console
C. Use Automa
D. Use Selenium IDE
E. Revisit list of Awesome browser automation tools and find one with good documentation and tutorials

Tip: use Inspect and then Copy > Selector to get code to select element.

// contributors.js
// James Carroll, Jan 2024
// Gather a list of names and email addresses of those who have made changes to a given FamilySearch person profile.
// Define contributor object
// Name
// Email address
// 2.0 Relationship
// 2.0 Phone number
// Prepare table to receive contributor information
// add(contributor)
//
// 2.0 Add ability to search list of contributors to only add if the information is unique
// In the highly unlikely case that two contributors have the same name and different email addresses, check both to determine duplicates
// Loop over elements of table
// Get selector
//
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment