hrenfroe / yahoo-groups-backup

A python script to backup the contents of private Yahoo! groups.
The Unlicense
3 stars 4 forks source link

Error message #5

Open JustinCEO opened 4 years ago

JustinCEO commented 4 years ago

Hi.

I ran yahoo-groups-backup.py with scrape_messages, the name of a yahoo groups list, and -driver=chrome (the latter because firefox does nothing when I try to use it).

the program ran successfully for a while but then halted and produced the following error message (which I have edited only to change the actual home folder name to "fakeaccountname"). Thanks.


  File "/home/fakeaccountname/.local/lib/python3.6/site-packages/splinter/element_list.py", line 40, in __getitem__
    return super(ElementList, self).__getitem__(index)
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "yahoo-groups-backup.py", line 129, in <module>
    main()
  File "yahoo-groups-backup.py", line 125, in main
    arguments, cfg_args)
  File "yahoo-groups-backup.py", line 103, in invoke_subcommand
    return module.command(args)
  File "/home/fakeaccountname/yahoo-groups-hrenfroe/yahoo_groups_backup/subcommands/scrape_messages.py", line 50, in command
    msg = scraper.get_message(cur_message)
  File "/home/fakeaccountname/yahoo-groups-hrenfroe/yahoo_groups_backup/scraper.py", line 178, in get_message
    formatted = self._load_json_url(url)
  File "/home/fakeaccountname/yahoo-groups-hrenfroe/yahoo_groups_backup/scraper.py", line 81, in _load_json_url
    return json.loads(self.br.find_by_tag("pre")[0].text)
  File "/home/fakeaccountname/.local/lib/python3.6/site-packages/splinter/element_list.py", line 44, in __getitem__
    self.find_by, self.query))
splinter.exceptions.ElementDoesNotExist: no elements could be found with tag_name "pre"```
groeneveld commented 4 years ago

Sometimes I just have to restart it after mysterious errors. It restarts where it left off.

JustinCEO commented 4 years ago

Sometimes I just have to restart it after mysterious errors. It restarts where it left off.

I actually wasn't aware it'd pick up where it left off. That's good to know. I can carry on archiving. Yahoo is really putting everyone under the gun here with this website purge.

groeneveld commented 4 years ago

I wasn't either. Yea really!

JustinCEO commented 4 years ago

I got a new error message, and unfortunately the program is not merely picking up where it left off from this one. It appears stuck in the archiving.

  File "yahoo-groups-backup.py", line 129, in <module>
    main()
  File "yahoo-groups-backup.py", line 125, in main
    arguments, cfg_args)
  File "yahoo-groups-backup.py", line 103, in invoke_subcommand
    return module.command(args)
  File "/home/fakeaccountname/yahoo-groups-hrenfroe/yahoo_groups_backup/subcommands/scrape_messages.py", line 50, in command
    msg = scraper.get_message(cur_message)
  File "/home/fakeaccountname/yahoo-groups-hrenfroe/yahoo_groups_backup/scraper.py", line 193, in get_message
    return self._massage_message(data)
  File "/home/fakeaccountname/yahoo-groups-hrenfroe/yahoo_groups_backup/scraper.py", line 130, in _massage_message
    assert '@' in data['authorName']
AssertionError
hrenfroe commented 4 years ago

Can you try @Onigiri-kun 's patch at #7 ? If that works for you I will see about getting it in.

JustinCEO commented 4 years ago

that worked @hrenfroe! thanks :D