its all about the logic: findall posts & the corresponding threads - on vbulletin

允我心安 提交于 2021-02-15 07:42:58

问题


fellow stackers,

i am working to get the discourse of a user in vbulletin: Main goal: at the end we have all the threads (and discourses) where our demo-user is involved. on a sidenote: This means that we should keep in mind a nice presentation of the gathered results. For working out the logic that enables us to use this technique - on all Vbulletin (that run version 3.8xy). we choose a demo-page[which is only a example with an open board - visible to anybody without registration].

starting-point: we take a vbulletin (version 3.8.xy) as an example-board - see the page: https://forums.sagetv.com/forums/ note - no login necessary!

..then choose one single author (user) of this board - just pick one...as an example: just for example: https://forums.sagetv.com/forums/member.php?u=4793 - (we may pick any other)

look for: show all statistics:

Total Posts
    Total Posts: 4,406
    Posts Per Day: 0.78
    Find all posts by nyplayer
    Find all threads started by nyplayer

and then you get a starting point - with the page of the postings: "Find all posts by nyplayer" - https://forums.sagetv.com/forums/search.php?searchid=15505533

and now we have a page, that is showing results 1 to 25 of xyz postings

"Showing results 1 to 25 of xyz postings"

...and now we need to pick all the posts - and besides that: The whole thread, in which the user nyplayer is one poster among others. At the end we get all the threads and discourses (of our example-user) nyplayer is involved. Notice the difference: we are aiming for all the discourse, nplayer (our demo-user) is involved in. We re not aiming to get (only) the threads he started. This little condition makes it a bit more tricky to solve the task - and besides that: i guess we need to find out a good method to store and display the data we gathered. Perhaps csv is a good idea - so that we can work with the results...

The task to get all includes skip from page to page: ...while having worked out the first pages where we gathered all the threads where nplayer is involved - we can go ahead to the next page - and to the next... untill we reached the end of the pages where postings of nplayer are displaeyd.

note: i have added some images to illustrate the two main tasks to solve. a. gathering all the threads of a certain author - note: as mentioned above: this is more than only getting the threads he has started. Main-goal: getting the whole (!) threads a certain author is involved. This of course includes to go through all the pages (see the attached images). Thats just all.

Starting point could be the overview of postings of any of the user of this example-board... - from there we could gain the general logic...

and best would be - to fetch all the thread.

so the job is:

  1. first of all: we need to findall the threads (that contain postings of our certain user); ...and while we got the threads (discourses) of the first page.. ; then we have
  2. to skip to the next page - and the next and the next

Main goal: at the end we have all the threads (and discourses) where our demo-user is involved. For working out the logic that enables us to use this technique - on all Vbulletin (that run version 3.8xy).

the coding parts, that i have found so far:

the steps:

1. gathering the postings and the threads(!) where our demo-user is involved

.... threads = soup.find_all('tr', attrs={'class' : 'alt1'})

tr 
td class="alt1"

  1. Showing results 1 to 25 of xyz postings

posted By xyz means: that we ve got an certain amount of (for example) xyz postings (situated in various threads):

 td class="vbmenu_control

finally - the last question is: how to store all the gathered data? Which format should be used..!? thats another question.. But i am pretty sure that here some nice techniques are available...

look forward to hear from you

来源:https://stackoverflow.com/questions/66111803/its-all-about-the-logic-findall-posts-the-corresponding-threads-on-vbulleti

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!