Powered by Invision Power Board


Pages: (20) « First ... 4 5 [6] 7 8 ... Last » ( Go to first unread post ) Reply to this topicStart new topicStart Poll

> MyMunzeeCSV discussion thread
Robje64GC Profile
Posted: August 21, 2012 03:31 am
Quote Post


Beginner
*

Group: Member
Posts: 4
Member No.: 7321
Joined: March 27, 2008



Ok. very clear on what you are saying.
Thanks for the response.

I have this topic on notification setting, so anything
that might change i will notify.

Thanks for all your hard work to all of us Bärti.

Cheers,

Robje64
PMEmail Poster
Top
ruttentuttelsGC Profile
Posted: August 21, 2012 04:12 am
Quote Post


Intermediate
**

Group: Member
Posts: 308
Member No.: 22361
Joined: October 09, 2011



Hi Barti,

Having some closer look to what goes wrong, i think the macro and
the data is having troubles with the following expression:

$sEspression = "<td><a href='http://www.munzee.com/m/(*)/(*)/'>"

The RegExSub returns empty values on the search.
According to the help file of GSAK, the syntax on wildcards are:

$sEspression = "<td><a href='http://www.munzee.com/m/(\d*)/(\d*)/'>"

but that doesnt change anything.

Could you help me to find the right expression? Than I could maybe come up
with an answer how to continue.

Rick.
PMEmail Poster
Top
bärtiGC Profile
Posted: August 21, 2012 04:46 am
Quote Post


Beginner
*

Group: Member
Posts: 44
Member No.: 443
Joined: January 24, 2006



Hi Rick,

believe me, you get no more capture data from the web site. Not with the GSAK commands and functions.

You can check it with right click on your mouse and "Show Page Source" (in Germany: Seitenquelltext anzeigen)
or with the following code:
CODE
$Data = GetUrl("http://www.munzee.com/m/ruttentuttels")

$Status = PutFile($_AppData + "\temp\test.txt",$Data)
IF Left($Status,7) = "*Error*"
 Pause Msg="$Status"
 Cancel
ENDIF


There is no problem with the expression.

Stephan
PMEmail Poster
Top
TheWinterTrioGC Profile
Posted: August 21, 2012 06:44 am
Quote Post


Experienced
***

Group: Member
Posts: 951
Member No.: 15510
Joined: September 06, 2010



Not sure about an fully automated way to do it, but each user can prep a file that a macro could parse out...

If you go to your "Captured" page and Select All and paste in into something like MSWord. Then save it as an HTML page and you would see something like this for each Captured Munzee.

QUOTE
<tr style='mso-yfti-irow:15'>
  <td valign=top style='border:none;border-top:solid #DDDDDD 1.0pt;mso-border-top-alt:
  solid #DDDDDD .75pt;padding:7.5pt 7.5pt 6.75pt 7.5pt'>
  <p class=MsoNormal style='margin-bottom:13.5pt;line-height:13.5pt'><span
  style='font-size:10.0pt;font-family:"Helvetica","sans-serif";mso-fareast-font-family:
  "Times New Roman";color:#404040'><a href="http://www.munzee.com/m/JB/23/"><span
  style='mso-bidi-font-size:11.0pt'>Langus Loop 5</span></a><o:p></o:p></span></p>
  </td>
  <td valign=top style='border:none;border-top:solid #DDDDDD 1.0pt;mso-border-top-alt:
  solid #DDDDDD .75pt;padding:7.5pt 7.5pt 6.75pt 7.5pt'>
  <p class=MsoNormal style='margin-bottom:13.5pt;line-height:13.5pt'><span
  style='font-size:10.0pt;font-family:"Helvetica","sans-serif";mso-fareast-font-family:
  "Times New Roman";color:#404040'>May 26, 2012 8:52 pm<o:p></o:p></span></p>
  </td>
  <td valign=top style='border:none;border-top:solid #DDDDDD 1.0pt;mso-border-top-alt:
  solid #DDDDDD .75pt;padding:7.5pt 7.5pt 6.75pt 7.5pt'>
  <p class=MsoNormal style='margin-bottom:13.5pt;line-height:13.5pt'><span
  style='font-size:10.0pt;font-family:"Helvetica","sans-serif";mso-fareast-font-family:
  "Times New Roman";color:#404040'>5<o:p></o:p></span></p>
  </td>
</tr>


If you could grab all the red entries, Name, Friendly Name, Date and Points, you could add those to the database and even be able to calculate your point total...

Scraping the file to get all the correct information may be very ugly...

-TWT
PMEmail Poster
Top
ruttentuttelsGC Profile
Posted: August 21, 2012 10:52 am
Quote Post


Intermediate
**

Group: Member
Posts: 308
Member No.: 22361
Joined: October 09, 2011



Hi Stephan,

Well I am testing the following methode:

1. Goto your personal webpage of Munzee.com and select the captured munze's page.
2. Save the html page to your disk (should than be always on the same spot).
3. Start the macro. It is than modified to use Getfile to read the content of the stored webpage rather than get it from munzee.com.
4. Continue to perform as normal.

Now in that situation, the stored website contains exactly what we want, all captured
data like you are requesting for but it seems to go wrong with that RegExSub line
where the captured username en id are everytime empty.

If we could get this working, I at least, would be very happy and can update
the founds again in GSAK.

Could you assist me with this? Thanks in advance.

Rick.

This post has been edited by ruttentuttels on August 21, 2012 10:55 am
PMEmail Poster
Top
The CEOGC Profile
Posted: August 21, 2012 02:51 pm
Quote Post


Advanced
****

Group: Member
Posts: 2099
Member No.: 1096
Joined: April 19, 2006



With this site it seems you can generate a URL that gets munzees (including or only your captured ones) in GPX or JSON format. Maybe this can be a starting point for a automtated version?
PMEmail Poster
Top
rodzGC Profile
Posted: August 22, 2012 04:53 am
Quote Post


Beginner
*

Group: Member
Posts: 54
Member No.: 1455
Joined: June 09, 2006



It is fairly straight forward to download the information page using WGET (you will need to enter your Munzee password into a GSAK form once), then parse the info and use most of the code that was in the previous version to update the finds.
PMEmail Poster
Top
ruttentuttelsGC Profile
Posted: August 22, 2012 07:22 am
Quote Post


Intermediate
**

Group: Member
Posts: 308
Member No.: 22361
Joined: October 09, 2011



Using WGET is the same as saving the HTML page to the disk. But that of course is a manual action.

I do have the macro active to update the finds now and it was not straight forward at all. Needed to rewrite quite some code to have it working but before sharing it, I would like to ask Barti to look at it because the source is his. The interface needs
to be changed a little and maybe the WGET option is someting which could be used.
I was thinking of a flexible box where you can enter the file which contain your finds
from the website as described in previous post.

@Barti, do you have time to look at the modified code to see if you have
any additional thoughts and comments?
Let me know and I will email it to you.

Rick
PMEmail Poster
Top
lignumaquaGC Profile
Posted: August 22, 2012 07:35 am
Quote Post


Zen Master
*****

Group: Admin
Posts: 16590
Member No.: 989
Joined: April 10, 2006



Forgive me as I know nothing about Munzee or how Munzee's web site works and this may be a stupid question. Why are you using WGET rather than the built-in GetUrl() function?
PMEmail Poster
Top
ruttentuttelsGC Profile
Posted: August 22, 2012 09:27 pm
Quote Post


Intermediate
**

Group: Member
Posts: 308
Member No.: 22361
Joined: October 09, 2011



When I was looking for the reason why the macro didn't update the founds anymore, I found that the GetUrl function does not execute the JSON script which is used on the
Munzee website which results in a data file without the captured information.

I am not sure if the unix WGET function does the same as a browser and will
retrieve the complete site info. As far I can see, the captured data is available when
you save the HTML page of Munzee to the disk. And then data could be retrieved.

But the data of captured munzee's is limited. The only info that you get is the
name of the munzee and the captured date. So where I am struggling now with
is that when you have captured Virtuals or special Munzee's outside of the scope
you selected, the munzee's are added to the database but without any additional
information. For the purpose of filtering own and found munzee's, thats okay but if
someone wants to have the specific data of a find, than additional steps needs to
be taken.

I also found an issue on archived munzee's or double captured ones (birthday cakes), hope to solve that soon.

Lets see if we manage to get something back operational. The best solution would
be that the FOUNDS could be retrieved from Munzee.com itself.

Rick.

This post has been edited by ruttentuttels on August 22, 2012 09:28 pm
PMEmail Poster
Top
lignumaquaGC Profile
Posted: August 22, 2012 11:53 pm
Quote Post


Zen Master
*****

Group: Admin
Posts: 16590
Member No.: 989
Joined: April 10, 2006



The problem is likely that you have a logged in session, so would need to track Session Cookies. That's tough to do with GetUrl(). I've done it before in GSAK with short VB scripts. They can be invoked from a macro with no need to install external applications.
PMEmail Poster
Top
ruttentuttelsGC Profile
Posted: August 23, 2012 01:19 am
Quote Post


Intermediate
**

Group: Member
Posts: 308
Member No.: 22361
Joined: October 09, 2011



Hi lignumaqua,

yes, that might be an issue. That means that Munzee.com did change there
policy because just before a few weeks, it worked without any additions to the GetUrl function.

Looking at the help file of Gsak, regarding the GetUrl function, there is no description about how to handle with cookies.

Nevertheless, I don't think it will be a problem if you could select from the macro
window the file that you want to use containing the captures. At least, I wouldn't mind.

I am slowly getting there. Still having some issues but it look like that it will do what I need to have the founds and own munzee's filtered out to have just the notfounds on the Garmin.
PMEmail Poster
Top
The CEOGC Profile
Posted: August 23, 2012 04:27 am
Quote Post


Advanced
****

Group: Member
Posts: 2099
Member No.: 1096
Joined: April 19, 2006



Rather than session related, this post on the Munzee forum suggests you need to include the right Referer and Header with the HTTP request, in order to retrieve the 'Captures'.
PMEmail Poster
Top
ruttentuttelsGC Profile
Posted: August 23, 2012 04:46 am
Quote Post


Intermediate
**

Group: Member
Posts: 308
Member No.: 22361
Joined: October 09, 2011



Thanks CEO for the link to the Munzee forum.

Well, I am running out of options. Struggling with limitations on RegEx function.
It fails when the string contains characters and numbers.

Guess it is a big struggle and DFX might be the most possible solution to
get uncaptured munzees from Munzee.com.

I don't have too much knowledge on the macro script to have it all sorted out.

At least, I did try to find a way, get better inside knowledge on the macro language
and spend some hours. It did look like a big mystery geocache ;-)

Thanks for support.

Rick.
PMEmail Poster
Top
stantasticGC Profile
Posted: August 23, 2012 07:39 am
Quote Post


Beginner
*

Group: Member
Posts: 74
Member No.: 16691
Joined: December 23, 2010



I was in Greenland and Iceland for the last three weeks of July (finding geocaches and munzees -- okay ONE munzee in Reykjavik (a virtual) -- and I deployed the FIRST physical munzee in Greenland!!!!!!) but when I got back I discovered that the MyMunzeeCSV macro is no longer working regarding updating my founds. sad.gif Dang it!!

I found it so useful in gathering .gpx munzee data and being able to keep track of my FOUND munzees in a database, but it looks like the munzee site has messed up the database structure -- again.

I can understand the author's frustration in not being able to get the macro to work with a re-write, and I'm frustrated as well. Even though there's "another" website that creates .gpx files for munzees, that .gpx file isn't as integrated into GSAK as I would like it to be (e.g. my founds are "distinguishable" in GSAK using MyMUunzeeCSV).

I would hope that someone could figure out a way to solve the problem.
PMEmail Poster
Top
rodzGC Profile
Posted: August 23, 2012 07:52 am
Quote Post


Beginner
*

Group: Member
Posts: 54
Member No.: 1455
Joined: June 09, 2006



Here is a quick macro to download your Munzee caps to a file. It uses WGET which is binary coded in the macro (one EXE and two DLLs in the temp folder) so no other install is required. It should be easy to replace the GetURL() in the old version of the macro but the RegEx will need some adjusting. Your Munzee password needs to be input as well. Hope that helps.

This macro has been updated - please scroll down for the latest version.

This post has been edited by rodz on August 23, 2012 09:14 pm
PMEmail Poster
Top
stantasticGC Profile
Posted: August 23, 2012 09:54 am
Quote Post


Beginner
*

Group: Member
Posts: 74
Member No.: 16691
Joined: December 23, 2010



Thanks, rodz --

I just copied the WGETmunzeecaps.gsk file to my Windows virtual image (running Parallels on a Mac), edited my username and password, and ran it from within GSAK. It created the MZcapfile.txt file, but after that I'm stuck. I tried loading it into a database from GSAK using the menu option Load GPX/LOC/ZIP file and setting the File type under Load Options to "Text (with first line field structure)" but got zero loads.

How do I get the MZcapfile.txt file into a GSAK database? Sorry if that seems inanely simple, but I'm not seeing it.

Thanks smile.gif

This post has been edited by stantastic on August 23, 2012 09:55 am
PMEmail Poster
Top
rodzGC Profile
Posted: August 23, 2012 03:14 pm
Quote Post


Beginner
*

Group: Member
Posts: 54
Member No.: 1455
Joined: June 09, 2006



My above macro is not a complete solution to the problem - it merely solves barti's problem of getting the Munzee cap/find data from the updated website. My code needs to be incorporated into the MyMunzeeCSV so that it can then process the generated cap file. The logic to do this was present in v225 but some changes will also need to be made to parse the new format (I think).

So at this stage the macro won't help you, I'm afraid, other than to know that this is a step towards getting the macro back to full working order.
PMEmail Poster
Top
ruttentuttelsGC Profile
Posted: August 23, 2012 03:33 pm
Quote Post


Intermediate
**

Group: Member
Posts: 308
Member No.: 22361
Joined: October 09, 2011



Rodz, that looks promising. The created file with captures looks better than the one I currently use to grep the captures.

Lets see how far we can come with this one and the implementation. Thanks for the sharing and contribution.

Rick.
PMEmail Poster
Top
rodzGC Profile
Posted: August 23, 2012 08:51 pm
Quote Post


Beginner
*

Group: Member
Posts: 54
Member No.: 1455
Joined: June 09, 2006



@barti

I have updated my macro slightly so that it takes care of the parsing of the capture details and have hopefully used the same variable naming conventions. It should slip into your macro quite easily. It is probably not worth scraping the individual Munzee pages to get FTC etc as the capture date is already provided. What do think?

This is still a piece of code that on its own does nothing useful but is another step towards getting the macro back to full functionality. Hope it helps.

Attached File ( Number of downloads: 172 )
Attached File  WGETmunzeecaps.gsk
PMEmail Poster
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

Topic OptionsPages: (20) « First ... 4 5 [6] 7 8 ... Last » Reply to this topicStart new topicStart Poll

 



[ Script Execution time: 0.0259 ]   [ 11 queries used ]   [ GZIP Enabled ]