return date of the post
This commit is contained in:
parent
80b8e11912
commit
c2efc864d4
1 changed files with 6 additions and 1 deletions
7
main.py
7
main.py
|
@ -66,7 +66,12 @@ class Scraper:
|
||||||
_link = {"f": _link[0], "t": _link[1]}
|
_link = {"f": _link[0], "t": _link[1]}
|
||||||
except:
|
except:
|
||||||
_link = None
|
_link = None
|
||||||
elements[i] = {"title": _title, "author": _author, "link": f"https://forum.mobilism.org/viewtopic.php?f={_link['f']}&t={_link['t']}", "linkParams": _link}
|
try:
|
||||||
|
_date = findall(r"</a> <i class=\"icon-time\"></i> <small>(.*)</small>", elements[i])[0]
|
||||||
|
except:
|
||||||
|
_date = None
|
||||||
|
print("\n" + elements[i] + "\n")
|
||||||
|
elements[i] = {"title": _title, "author": _author, "date": _date, "link": f"https://forum.mobilism.org/viewtopic.php?f={_link['f']}&t={_link['t']}", "linkParams": _link}
|
||||||
|
|
||||||
return elements
|
return elements
|
||||||
|
|
||||||
|
|
Reference in a new issue