Skip to content

Fetch Periscope data#349

Open
carlospreising wants to merge 15 commits intoMaineDSA:mainfrom
carlospreising:fetch-periscope
Open

Fetch Periscope data#349
carlospreising wants to merge 15 commits intoMaineDSA:mainfrom
carlospreising:fetch-periscope

Conversation

@carlospreising
Copy link
Contributor

Funny enough, I had already been working on a selenium script to grab periscope data, started like two weeks ago.

Here I also change the way lists are grabbed, so that we support unzipped CSV's in the filenames that periscope outputs. I also added (a bit clumsily) a button to fetch new periscope data.

New .env requirements for periscope data: PERISCOPE_URL and PERISCOPE_PASS

You can test the selenium script only by running uv run src/fetch_list.py

Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ruff found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

@carlospreising carlospreising marked this pull request as draft February 19, 2026 20:22
@carlospreising
Copy link
Contributor Author

going to make sure these pass tests before undrafting!

@carlospreising carlospreising marked this pull request as ready for review February 19, 2026 21:14
@bmos
Copy link
Contributor

bmos commented Feb 20, 2026

Check out the contributing guide, ruff can autofix a lot

@github-actions
Copy link

github-actions bot commented Feb 20, 2026

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  src
  app.py 1-16, 51-91
  src/components
  sidebar.py 1-17
  src/utils
  fetch_list.py 1-36, 38-63, 67-75, 78-79
  scan_lists.py 156, 161-170, 179-183, 195-199
Project Total  

This report was generated by python-coverage-comment-action

@bmos
Copy link
Contributor

bmos commented Feb 20, 2026

Can you look at doing this with requests instead?
I don't love having to use a webdriver to accomplish this, although it might be necessary.
Just open your browser inspector's network tab before logging in to periscope and you'll see what the traffic looks like during login/data load.

@carlospreising
Copy link
Contributor Author

@bmos I started out trying to do it via request/bs4, but I couldn't figure out how to work out how to send the password, since it looks like they hash it in a specific way (md5 + doing other stuff to it, I think?). I'm not very well versed in web dev/auth so I could be wrong here, or looking at the wrong thing.

Once authenticated, the hover and other dynamic elements made me turn to selenium, since there isn't just like a, "here's a csv link!". I can look into this more though, I think I have a few people I can ask about it.

@carlospreising
Copy link
Contributor Author

oh wait we might be able to just POST it, I think this is possible. Will update.

@carlospreising carlospreising marked this pull request as draft February 20, 2026 17:14
@carlospreising carlospreising marked this pull request as ready for review February 20, 2026 22:28
@bmos
Copy link
Contributor

bmos commented Feb 21, 2026

This is looking so great! I will probably refactor it to move things around a bit and maybe some UI polish, but expect this to be merged sometime soon 🥰

@carlospreising
Copy link
Contributor Author

I am definitely not a UI person, so I'm glad to hear that!

@bmos bmos force-pushed the fetch-periscope branch from 45c86f3 to e5b9e24 Compare March 5, 2026 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants