Browse Source

fixed bug where recent posts will not show the full date

master
= 1 month ago
parent
commit
14a3a3c976
3 changed files with 4 additions and 3 deletions
  1. +1
    -1
      README.md
  2. BIN
      images/txtExample.jpg
  3. +3
    -2
      scraper/postData.py

+ 1
- 1
README.md View File

@@ -94,7 +94,7 @@ File saved to path\to\directory\filename.json
## Upcoming
- I plan on implementing functionality to allow for formated text output to be included. This will include special markings for quotes, media, and other special content that would exist within a post. Currently this is left blank in the JSON output.

- I plan on adding plain-text / copy/paste as output options.
- I plan on adding copy/paste as an output option.

## Contributing
Pull requests are welcome. I'm always open to new ideas.

BIN
images/txtExample.jpg View File

Before After
Width: 3000  |  Height: 1760  |  Size: 444 KiB Width: 2959  |  Height: 1765  |  Size: 444 KiB

+ 3
- 2
scraper/postData.py View File

@@ -172,9 +172,10 @@ class PostData:
self.poster = infoBS.find("span", class_ = "username").text
except AttributeError:#if user is a guest, username data is stored in a different tag
self.poster = infoBS.find("a", class_ = "username").text
self.postDate = infoBS.find("time", class_ = "u-dt").text
self.postDate = infoBS.find("time", class_ = "u-dt")["data-date-string"]
print(self.postDate)
try:
self.editDate = infoBS.find("div", class_ = "message-lastEdit").find("time", class_ = "u-dt").text
self.editDate = infoBS.find("div", class_ = "message-lastEdit")
self.edited = True
except:
self.edited = False


Loading…
Cancel
Save