Found this content helpful? Log in or sign up to leave a like!
User Pageviews Pagination <sigh/>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
I am an admin and Python novice. I am trying to create a script that will pull a user's pageviews within a date range and save that to a CSV file. To date, I have only be able to access the first page of results. I can't seem to get the script to navigate through subsequent pages.
I have seen posts with example script snippets (here, here, and here) but am having a difficult time implementing those strategies. I have attached two example files, one using the Requests module and one using the CanvasAPI module.
Can someone please look at my scripts and point out what I am missing?
Thank you in advance for any assistance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Pagination works and I finally have been able to get pageviews!
Thank you @chriscas for your help here, and for inviting me to the Developer group. @melodyc_lam was especially helpful by providing an example script. Thank you @melodyc_lam !
I think part of the issue with my original script may be that I am including the headers in each call rather than creating them as a session object. I plan to go back and try this approach with my original script.