getmsgs
| Newsgroups | gmane.comp.emulators.hercules390.general |
|---|---|
| Message-ID | <[email protected]> |
I have written a small program that makes use
of "curl" to get messages one at a time from a
Yahoo group:
https://groups.yahoo.com/neo/groups/hercules-390/files/getmsgs.zip
I have run it (seemingly) successfully on pdos,
hercules-politics and C-IBM-mainframe.
I tried it on hercules-tss and it didn't seem to
work.
I'm going to try it on hercules-380 and
musicspdemo, but the volume there is much
higher and I think Yahoo might lock my IP
address out if I retrieve too much in one go.
Perhaps we could have a coordinated effort
to get portions of the groups archived.
Code is below.
BFN. Paul.
/*********************************************************************/
/* */
/* This Program Written by Paul Edwards. */
/* Released to the Public Domain */
/* */
/*********************************************************************/
/*********************************************************************/
/* */
/* getmsgs - get messages from Yahoo Groups */
/* */
/*********************************************************************/
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv)
{
int x;
int first;
int last;
if (argc <= 3)
{
printf("usage: getmsgs group-name firstmsg lastmsg\n");
printf("e.g. getmsgs pdos 1 107\n");
return (EXIT_FAILURE);
}
first = atoi(*(argv + 2));
last = atoi(*(argv + 3));
for (x = first; x <= last; x++)
{
printf("curl -4 https://groups.yahoo.com/api/v1/groups/"
"%s/messages/%d/raw >%d.txt\n", *(argv + 1), x, x);
}
return (0);
}