RefreshCapcha

Author Topic: New home same as the old?  (Read 11116 times)

Offline CuF

  • Sr. Member
  • ****
  • Posts: 330
  • Karma: +40/-0
    • View Profile
New home same as the old?
« on: January 19, 2015, 09:41:27 am »
I've tried to update some old scripts changing the [home].

Except the script in the debugger shows @home: (new home URL) as well as @home2: (old home url).

Then if the script sets a string with @home in it, it uses @home for some things and @home2 for others.
In other words the script is completely broken.

Does Bit Che save this data somewhere?  I assumed Settings.ini, but I can't find it there, so I can't understand why it's remember the old home.

Offline chip!

  • Bad Ass
  • Administrator
  • Unstoppable
  • *****
  • Posts: 2301
  • Karma: +629/-6
    • View Profile
Re: New home same as the old?
« Reply #1 on: January 19, 2015, 02:19:00 pm »
Thanks CuF, can you give me an example of which script? ill look at your specific issue and see what should be used.

here was some reasoning for what required @home2 in the first place... has to do with your Home URL and Profile URL.. http://convivea.com/forums/index.php/topic,2484.msg21124.html#msg21124


I think @home should be used, that's what keeps compatbility, but @home2 would give the original @home, if you have a Profile without / at the beginning or @home with more URL path beyond domain.com/ (unusual).
« Last Edit: January 19, 2015, 03:17:56 pm by chip! »
  -  https://convivea.com  -   And...  boom goes the dynamite.

Offline CuF

  • Sr. Member
  • ****
  • Posts: 330
  • Karma: +40/-0
    • View Profile
Re: New home same as the old?
« Reply #2 on: January 21, 2015, 05:35:45 am »
I was working on RUTracker's script, which 404's.  For some reason the home was "http://rutracker.org/forum/" and the search string "/forum/tracker.php?max=1&to=1&nm=%SEARCH%"

Since that is redundant I first tried editing the home by dropping the /forum/ off of that, and realized it would be better to remove /forum/ from the search since it is needed for the pages and torrents.

Anyway, when debugging @home reacted oddly.  At first glance it looked like it wasn't updating the information somewhere, but it just acts in a manner I don't expect. @home is http://rutracker.org and @home2 is http://rutracker.org/forum/.

Is that intended?  If so I'll rewrite the script around it.

Non-working script attached.

Offline chip!

  • Bad Ass
  • Administrator
  • Unstoppable
  • *****
  • Posts: 2301
  • Karma: +629/-6
    • View Profile
Re: New home same as the old?
« Reply #3 on: January 21, 2015, 01:31:42 pm »
Thanks, I'll look into it. It really depends on what the href= "path" is returned by that site for navigating to new URLs. Since it's all on the same domain, I suspect the home does not include /forums, and let the Profile contain it. When the site provides a newURL href it is normally in the context of domain.com only, but if the site does expect the base URL to include /forums and returns links like href= search.php with no /forums/ then special crafting would be required, and @home2 might come into play. Also, I included mergeurl() function to help if faced with a weird situation. The good news is that the site normally always follow http rules and things only get tricky with proxies, so I am pretty sure I can give better guidance once I can look at that script and the site.

EDIT::

but first, whats most important is that you're fixing 404 error.. page not found... so, what page was BC requesting that the server says does not exist? (should be shown in the .log)

then secondly, to figure out if the site needs weirdness trickery, what is the correct:
full search url?
full login url?
my guess is the script should work with Home="http://rutracker.org/"  and Profile="/proper/searchurl"   and login="/proper/loginurl"



EDIT2:

below appears to be working fine..    I guess the real change is that Home= should not have extra url path beyond Domain.com, unless absolutely required, such as those proxy URLs.. and in that case, @home returns the correct base URL and @home2 returns exactly what was put in the .INI as a backup if needed in the script.

Code: [Select]
[script]
name=RuTracker.org
source=RuTracker
author=CuF
modified=Bovski(ASC), CuF 2013/02/13
pwd=1
version=3

[login]
login=http://login.rutracker.org/forum/login.php
form=login_username=%USER%&login_password=%PASS%&login=%C2%F5%EE%E4
failed=sendpassword
failed2=%C2%F5%EE%E4

[home]
1=http://rutracker.org/
2=http://proxy.piratenpartij.nl/rutracker.org/

[profiles]
all=/forum/tracker.php?max=1&to=1&nm=%SEARCH%


EDIT3:

ahhh.. yet there is bug..  this URL was incorrectly generated using the above code and setting to the 2nd home:   http://proxy.piratenpartij.nl/rutracker.org/forum/login.php/forum/tracker.php?max=1&to=1&nm=%SEARCH%

it should have been http://login.rutracker.org/forum/login.php  because the login= has forced a http:// url.

i'll look into that further to fix in next build of BC.
« Last Edit: January 21, 2015, 03:31:36 pm by chip! »
  -  https://convivea.com  -   And...  boom goes the dynamite.

Offline CuF

  • Sr. Member
  • ****
  • Posts: 330
  • Karma: +40/-0
    • View Profile
Re: New home same as the old?
« Reply #4 on: January 21, 2015, 04:28:39 pm »
I may understand more of your post after reading it a few more times, but it seems you're on top of it.

I think there is something deeper going on though.
I noticed today a lot of scripts throwing errors and started trying to fix them.
They all had largely identical problems that looks like the scripts have become corrupted.

Most of the malfunctions are because 'home' looks like this: http://www.myspleen.org/takelogin.php instead of: http://www.myspleen.org.

I thought maybe one or two I could have accidentally done but a LOT of scripts are showing this and checking backup copies on my drive tells me they were originally correct.

So for some reason some of the homes are being replaced by the login URLs.  Dunno if this is related or what.

Edit: It seems to have occurred on sites where I am a member (there is a username/password saved on BC).  I see it in scripts I didn't even write like SceneFZ.net.

Randomly check sites for which I have No Accounts, the Home is correct.
« Last Edit: January 21, 2015, 04:57:24 pm by CuF »

Offline chip!

  • Bad Ass
  • Administrator
  • Unstoppable
  • *****
  • Posts: 2301
  • Karma: +629/-6
    • View Profile
Re: New home same as the old?
« Reply #5 on: January 22, 2015, 12:05:08 am »
got it.. yeah looks like some issues. I had a mass script update recently to clean out old URLS and sites, but it updated login sites to a login url.. so those do need to be fixed. 

more of the overall issue is that the function extract()  simply combines text to the front/back.. not merging a URL. which is fine by design, except for the issue of how @home is created.. this issue really only started once i made some changes to support the proxy where it goes http://proxy.domain/url_to_request.com/

anyway, ill review everything and see what needs to be done. thanks for pointing all that out.
  -  https://convivea.com  -   And...  boom goes the dynamite.

Offline CuF

  • Sr. Member
  • ****
  • Posts: 330
  • Karma: +40/-0
    • View Profile
Re: New home same as the old?
« Reply #6 on: January 22, 2015, 07:05:59 am »
Okay, good to know I'm not completely crazy.
I'll just refrain from updating scripts until this shakes out.

Offline chip!

  • Bad Ass
  • Administrator
  • Unstoppable
  • *****
  • Posts: 2301
  • Karma: +629/-6
    • View Profile
Re: New home same as the old?
« Reply #7 on: January 22, 2015, 02:25:46 pm »
I updated the pack to fix those URLs that got modified with /login stuff.. and a temp workaround for rutracker.  then i made a slight tweak to the BC to avoid issues.   ill explain more with the next update.
  -  https://convivea.com  -   And...  boom goes the dynamite.

Offline CuF

  • Sr. Member
  • ****
  • Posts: 330
  • Karma: +40/-0
    • View Profile
Re: New home same as the old?
« Reply #8 on: January 27, 2015, 07:11:37 am »
Since the last update I still see bad Homes for AsianDVDClub, Empornium.me (not sure why that would have corrupted since it isn't part of a script pack), RUTracker.

That just the ones I've checked.