Hi 
1to9only and 
Mike Metcalf,
1to9only wrote:Add '&view=print' to the url, e.g. viewtopic.php?f=8&t=6291&view=print - use copy&paste to save the contents to a text file. Repeat for 26 pages.
BTW, I see no significant difference in processing the page by either adding '&view=print' or not in url address.
Pick out the line 'game NNNN YYYY-MM-DD+HH:MM:SS-0000 ...' for the game number.
Convert empty cells '0' to dots '.'.
Include the game number in the output line, e.g.
..1...2...2...4.1.6...8...4..86.2..5....1....4..3.79..5...9...7.1.5...3...3...1.. # 0382 1 1.5/1.2/1.2 - champagne
I like it and will implement the same accordingly.
Here is a quick fix for '0' to '.': [Modified as on 20200427]
- Code: Select all
- #include <stdio.h>
 
 int main (void)
 {
 int i;
 
 char a[1024],
 g[4];
 
 FILE *f = fopen ("PGResult.txt", "r");
 
 if (f == NULL)
 printf ("Error: Unable to open PGResult.txt file for read !!\n");
 else
 while (fgets (a, 1024, f) != NULL)
 {
 if (a[0] == 'g' && a[1] == 'a' && a[2] == 'm' && a[3] == 'e')
 {
 g[0] = a[5];
 g[1] = a[6];
 g[2] = a[7];
 g[3] = a[8];
 }
 for (i = 0; i < 81; ++i)
 if (a[i] < '0' || a[i] > '9')
 break;
 else if (a[i] == '0')
 a[i] = '.';
 if (i > 80)
 printf ("%s ", a);
 }
 if (fclose (f) == EOF)
 printf ("Error: Unable to close PGResult.txt file !!");
 }
For games 0001-0381 inclusive, I have 39,128 entries. This includes updated games 12-13 and all more entries.
Will you please explain what do you mean by and how "includes updated games 12-13 and all more entries"? [Answered]
I got 39,189 puzzles. I think my entries included 44 posted pearls from game 12; and 17 posted pearls from game 13; i.e., total 61 more puzzles.
m_b_metcalf wrote:If I were to start again, I would investigate web scraping.
I prefer 
Human copy-and-paste method.
R. Jamil