Web刮板以获取所有课程中的所有作业,或者仅从Google API的Google教室中的特定课程中获取所有作业

发布于 2025-02-07 05:49:04 字数 824 浏览 1 评论 0原文

我正在尝试从教室中下载所有课程(或特定课程)的所有作业,不使用Google API,但仅使用Bash,

我尝试的第一件事就是简单地下载页面的来源,但是如果您不登录,您会得到

<HTML>
<HEAD>
<TITLE>Moved Temporarily</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Moved Temporarily</H1>
The document has moved <A HREF="https://accounts.google.com/ServiceLogin?service=classroom&amp;passive=1209600&amp;continue=https://classroom.google.com/&amp;followup=https://classroom.google.com/&amp;emr=1">here</A>.
</BODY>
</HTML>

我通过使用开发人员工具分析网络的cookie下载它

然后,我尝试使用 /c/asdasdasdas

结果是相同的

,然后我去了页面,我打开了开发人员工具,并将其复制为curl,并将输出重定向到文件,但是输出始终是二进制文件

I'm trying to download all the assignments from all the courses(or a specific one) in classroom,it doesn't matter the format,without using the google api but only using bash

The first thing that I tried was to simply download the source of the page,but if you're not logged in you'll get

<HTML>
<HEAD>
<TITLE>Moved Temporarily</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Moved Temporarily</H1>
The document has moved <A HREF="https://accounts.google.com/ServiceLogin?service=classroom&passive=1209600&continue=https://classroom.google.com/&followup=https://classroom.google.com/&emr=1">here</A>.
</BODY>
</HTML>

then I tried to download it using the cookie that i found by analyzing the network using the developer tools

the command that i typed was :

curl -b cookie.txt 'https://classroom.google.com/u/0/c/asdasdasdas

the results were the same

then i went to the page,I opened the developer tools and I copied as curl some of the request,and redirected the output to a file,but the output was always a binary file

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文